Part Number Hot Search : 
SC2383 P6SMB HZS2L BM200 160BRWZ AT89C5 MIP2E4D 55N03LT
Product Description
Full Text Search
 

To Download R4S76190 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 To our customers,
Old Company Name in Catalogs and Other Documents
On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding.
Renesas Electronics website: http://www.renesas.com
April 1st, 2010 Renesas Electronics Corporation
Issued by: Renesas Electronics Corporation (http://www.renesas.com) Send any inquiries to http://www.renesas.com/inquiry.
Notice
1. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. When exporting the products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. Renesas Electronics products are classified according to the following three quality grades: "Standard", "High Quality", and "Specific". The recommended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application categorized as "Specific" without the prior written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as "Specific" or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics. The quality grade of each Renesas Electronics product is "Standard" unless otherwise expressly specified in a Renesas Electronics data sheets or data books, etc. Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots. "High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anticrime systems; safety equipment; and medical equipment not specifically designed for life support. "Specific": Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas Electronics. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries. "Standard":
2.
3. 4.
5.
6.
7.
8.
9.
10.
11. 12.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majorityowned subsidiaries. (Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
SH7619 Group 32
Hardware Manual Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7619 Series
SH7619 R4S76190 R4S76191
User's Manual
The revision list can be viewed directly by clicking the title page. The revision list summarizes the locations of revisions and additions. Details should always be checked by referring to the relevant text.
Rev.6.00 2009.07
Rev. 6.00 Jul. 15, 2009 Page ii of xxxviii
Notes regarding these materials
1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document. 2. Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. When exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. All information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas products listed in this document, please confirm the latest product information with a Renesas sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website. (http://www.renesas.com ) 5. Renesas has used reasonable care in compiling the information included in this document, but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. When using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products. 7. With the exception of products specified by Renesas as suitable for automobile applications, Renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. If you are considering the use of our products for such purposes, please contact a Renesas sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above. 8. Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications. 9. You should use the products described herein within the range specified by Renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges. 10. Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. Among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. You should implement safety measures so that Renesas products may not be easily detached from your products. Renesas shall have no liability for damages arising out of such detachment. 12. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from Renesas. 13. Please contact a Renesas sales office if you have any questions regarding the information contained in this document, Renesas semiconductor products, or if you have any other inquiries.
Rev. 6.00 Jul. 15, 2009 Page iii of xxxviii
General Precautions on Handling of Product
1. Treatment of NC Pins Note: Do not connect anything to the NC pins. The NC (not connected) pins are either not connected to any of the internal circuitry or are used as test pins or to reduce noise. If something is connected to the NC pins, the operation of the LSI is not guaranteed. 2. Treatment of Unused Input Pins Note: Fix all unused input pins to high or low level. Generally, the input pins of CMOS products are high-impedance input pins. If unused pins are in their open states, intermediate levels are induced by noise in the vicinity, a passthrough current flows internally, and a malfunction may occur. 3. Processing before Initialization Note: When power is first supplied, the product's state is undefined. The states of internal circuits are undefined until full power is supplied throughout the chip and a low level is input on the reset pin. During the period where the states are undefined, the register settings and the output state of each pin are also undefined. Design your system so that it does not malfunction because of processing while it is in this undefined state. For those products which have a reset function, reset the LSI immediately after the power supply has been turned on. 4. Prohibition of Access to Undefined or Reserved Addresses Note: Access to undefined or reserved addresses is prohibited. The undefined or reserved addresses may be used to expand functions, or test registers may have been be allocated to these addresses. Do not access these registers; the system's operation is not guaranteed if they are accessed.
Rev. 6.00 Jul. 15, 2009 Page iv of xxxviii
Configuration of This Manual
This manual comprises the following items: 1. 2. 3. 4. 5. 6. General Precautions on Handling of Product Configuration of This Manual Preface Contents Overview Description of Functional Modules * CPU and System-Control Modules * On-Chip Peripheral Modules The configuration of the functional description of each module differs according to the module. However, the generic style includes the following items: i) Feature ii) Input/Output Pin iii) Register Description iv) Operation v) Usage Note
When designing an application system that includes this LSI, take notes into account. Each section includes notes in relation to the descriptions given, and usage notes are given, as required, as the final part of each section. 7. List of Registers 8. Electrical Characteristics 9. Appendix 10. Main Revisions and Additions in this Edition (only for revised versions) The list of revisions is a summary of points that have been revised or added to earlier versions. This does not include all of the revised contents. For details, see the actual locations in this manual. 11. Index
Rev. 6.00 Jul. 15, 2009 Page v of xxxviii
Preface
The SH7619 Group RISC (Reduced Instruction Set Computer) microcomputers include a Renesas Technology-original RISC CPU as its core, and the peripheral functions required to configure a system. Target Users: This manual was written for users who will be using the SH7619 in the design of application systems. Target users are expected to understand the fundamentals of electrical circuits, logical circuits, and microcomputers. Objective: This manual was written to explain the hardware functions and electrical characteristics of the SH7619 to the target users. Refer to the SH-1/SH-2/SH-DSP Software Manual for a detailed description of the instruction set.
Notes on reading this manual: * In order to understand the overall functions of the chip Read the manual according to the contents. This manual can be roughly categorized into parts on the CPU, system control functions, peripheral functions and electrical characteristics. * In order to understand the details of the CPU's functions Read the SH-1/SH-2/SH-DSP Software Manual. * In order to understand the details of a register when its name is known The addresses, bits, and initial values of the registers are summarized in section 24, List of Registers. Examples: Register name: The following notation is used for cases when the same or a similar function, e.g. 16-bit timer pulse unit or serial communication interface, is implemented on more than one channel: XXX_N (XXX is the register name and N is the channel number) Bit order: The MSB is on the left and the LSB is on the right. Number notation: Binary is B'xxxx, hexadecimal is H'xxxx, decimal is xxxx. Signal notation: An overbar is added to a low-active signal: xxxx Related Manuals: The latest versions of all related manuals are available from our web site. Please ensure you have the latest versions of all documents you require. http://www.renesas.com/
Rev. 6.00 Jul. 15, 2009 Page vi of xxxviii
SH7619 Group manuals:
Document Title SH7619 Group Hardware Manual SH-1/SH-2/SH-DSP Software Manual Document No. This manual REJ09B0171
User's manuals for development tools:
Document Title SuperH RISC engine C/C++ Compiler, Assembler, Optimizing Linkage Editor User's Manual SuperHTM RISC engine High-performance Embedded Workshop 3 User's Manual SuperH RISC engine High-Performance Embedded Workshop 3 Tutorial
TM
Document No. REJ10B0152 REJ10B0025 REJ10B0023
Application note:
Document Title SuperH RISC engine C/C++ Compiler Package Application Note Document No. REJ05B0463
All trademarks and registered trademarks are the property of their respective owners.
Rev. 6.00 Jul. 15, 2009 Page vii of xxxviii
Rev. 6.00 Jul. 15, 2009 Page viii of xxxviii
Contents
Section 1 Overview................................................................................................1
1.1 1.2 1.3 1.4 Features................................................................................................................................. 2 Block Diagram...................................................................................................................... 7 Pin Assignments ................................................................................................................... 8 Pin Functions ........................................................................................................................ 9
Section 2 CPU......................................................................................................23
2.1 2.2 Features............................................................................................................................... 23 Register Configuration........................................................................................................ 23 2.2.1 General Registers (Rn)........................................................................................ 25 2.2.2 Control Registers ................................................................................................ 25 2.2.3 System Registers................................................................................................. 26 2.2.4 Initial Values of Registers................................................................................... 27 Data Formats....................................................................................................................... 28 2.3.1 Register Data Format .......................................................................................... 28 2.3.2 Memory Data Formats ........................................................................................ 28 2.3.3 Immediate Data Formats..................................................................................... 29 Features of Instructions....................................................................................................... 29 2.4.1 RISC Type .......................................................................................................... 29 2.4.2 Addressing Modes .............................................................................................. 32 2.4.3 Instruction Formats ............................................................................................. 35 Instruction Set ..................................................................................................................... 39 2.5.1 Instruction Set by Type....................................................................................... 39 Processing States................................................................................................................. 51 2.6.1 State Transition ................................................................................................... 51
2.3
2.4
2.5 2.6
Section 3 Cache ...................................................................................................53
3.1 Features............................................................................................................................... 53 3.1.1 Cache Structure................................................................................................... 53 3.1.2 Divided Areas and Cache.................................................................................... 55 Register Descriptions.......................................................................................................... 56 3.2.1 Cache Control Register 1 (CCR1) ...................................................................... 56 Operation ............................................................................................................................ 57 3.3.1 Searching Cache ................................................................................................. 57 3.3.2 Read Access........................................................................................................ 58 3.3.3 Write Access ....................................................................................................... 59
3.2 3.3
Rev. 6.00 Jul. 15, 2009 Page ix of xxxviii
3.4
3.3.4 Write-Back Buffer .............................................................................................. 59 3.3.5 Coherency of Cache and External Memory........................................................ 59 Memory-Mapped Cache ..................................................................................................... 60 3.4.1 Address Array..................................................................................................... 60 3.4.2 Data Array .......................................................................................................... 61 3.4.3 Usage Examples.................................................................................................. 63
Section 4 U Memory ........................................................................................... 65
4.1 4.2 Features............................................................................................................................... 65 Usage Notes ........................................................................................................................ 65
Section 5 Exception Handling ............................................................................. 67
5.1 Overview ............................................................................................................................ 67 5.1.1 Types of Exception Handling and Priority ......................................................... 67 5.1.2 Exception Handling Operations.......................................................................... 68 5.1.3 Exception Handling Vector Table ...................................................................... 69 Resets.................................................................................................................................. 71 5.2.1 Types of Resets................................................................................................... 71 5.2.2 Power-On Reset .................................................................................................. 71 5.2.3 H-UDI Reset ....................................................................................................... 72 Address Errors .................................................................................................................... 73 5.3.1 Address Error Sources ........................................................................................ 73 5.3.2 Address Error Exception Source......................................................................... 73 Interrupts............................................................................................................................. 74 5.4.1 Interrupt Sources................................................................................................. 74 5.4.2 Interrupt Priority ................................................................................................. 75 5.4.3 Interrupt Exception Handling ............................................................................. 75 Exceptions Triggered by Instructions ................................................................................. 76 5.5.1 Types of Exceptions Triggered by Instructions .................................................. 76 5.5.2 Trap Instructions................................................................................................. 76 5.5.3 Illegal Slot Instructions....................................................................................... 77 5.5.4 General Illegal Instructions................................................................................. 77 Cases when Exceptions are Accepted................................................................................. 78 Stack States after Exception Handling Ends....................................................................... 79 Usage Notes ........................................................................................................................ 81 5.8.1 Value of Stack Pointer (SP) ................................................................................ 81 5.8.2 Value of Vector Base Register (VBR)................................................................ 81 5.8.3 Address Errors Caused by Stacking for Address Error Exception Handling...... 81 5.8.4 Notes on Slot Illegal Instruction Exception Handling ........................................ 81
5.2
5.3
5.4
5.5
5.6 5.7 5.8
Rev. 6.00 Jul. 15, 2009 Page x of xxxviii
Section 6 Interrupt Controller (INTC) .................................................................83
6.1 6.2 6.3 Features............................................................................................................................... 83 Input/Output Pins................................................................................................................ 85 Register Descriptions.......................................................................................................... 85 6.3.1 Interrupt Control Register 0 (ICR0).................................................................... 86 6.3.2 IRQ Control Register (IRQCR) .......................................................................... 87 6.3.3 IRQ Status register (IRQSR) .............................................................................. 90 6.3.4 Interrupt Priority Registers A to G (IPRA to IPRG)........................................... 95 Interrupt Sources................................................................................................................. 97 6.4.1 External Interrupts .............................................................................................. 97 6.4.2 On-Chip Peripheral Module Interrupts ............................................................... 99 6.4.3 User Break Interrupt ........................................................................................... 99 6.4.4 H-UDI Interrupt .................................................................................................. 99 Interrupt Exception Handling Vector Table...................................................................... 100 Interrupt Operation ........................................................................................................... 102 6.6.1 Interrupt Sequence ............................................................................................ 102 6.6.2 Stack after Interrupt Exception Handling ......................................................... 104 Interrupt Response Time................................................................................................... 104
6.4
6.5 6.6
6.7
Section 7 Bus State Controller (BSC)................................................................107
7.1 7.2 7.3 Features............................................................................................................................. 107 Input/Output Pins.............................................................................................................. 110 Area Overview.................................................................................................................. 111 7.3.1 Area Division.................................................................................................... 111 7.3.2 Shadow Area..................................................................................................... 112 7.3.3 Address Map ..................................................................................................... 112 7.3.4 Area 0 Memory Type and Memory Bus Width ................................................ 114 7.3.5 Data Alignment................................................................................................. 114 Register Descriptions........................................................................................................ 115 7.4.1 Common Control Register (CMNCR) .............................................................. 116 7.4.2 CSn Space Bus Control Register (CSnBCR) (n = 0, 2, 3, 4, 5B, 6B) ............... 117 7.4.3 CSn Space Wait Control Register (CSnWCR) (n = 0, 3, 4, 5B, 6B) ................ 122 7.4.4 SDRAM Control Register (SDCR)................................................................... 138 7.4.5 Refresh Timer Control/Status Register (RTCSR)............................................. 139 7.4.6 Refresh Timer Counter (RTCNT)..................................................................... 141 7.4.7 Refresh Time Constant Register (RTCOR) ...................................................... 142 Operation .......................................................................................................................... 143 7.5.1 Endian/Access Size and Data Alignment.......................................................... 143 7.5.2 Normal Space Interface..................................................................................... 149 7.5.3 Access Wait Control ......................................................................................... 154
Rev. 6.00 Jul. 15, 2009 Page xi of xxxviii
7.4
7.5
7.5.4 7.5.5 7.5.6 7.5.7 7.5.8 7.5.9
Extension of Chip Select (CSn) Assertion Period............................................. 156 SDRAM Interface ............................................................................................. 157 Byte-Selection SRAM Interface ....................................................................... 186 PCMCIA Interface............................................................................................ 191 Wait between Access Cycles ............................................................................ 198 Others................................................................................................................ 198
Section 8 Clock Pulse Generator (CPG) ........................................................... 201
8.1 8.2 8.3 8.4 Features............................................................................................................................. 201 Input/Output Pins.............................................................................................................. 204 Clock Operating Modes .................................................................................................... 204 Register Descriptions........................................................................................................ 206 8.4.1 Frequency Control Register (FRQCR) ............................................................. 206 8.4.2 PHY Clock Frequency Control Register (MCLKCR) ...................................... 208 8.4.3 Usage Notes ...................................................................................................... 209 Changing Frequency ......................................................................................................... 210 8.5.1 Changing Multiplication Ratio ......................................................................... 210 8.5.2 Changing Division Ratio .................................................................................. 211 8.5.3 Changing Clock Operating Mode ..................................................................... 211 Notes on Board Design ..................................................................................................... 213
8.5
8.6
Section 9 Watchdog Timer (WDT) ................................................................... 215
9.1 9.2 Features............................................................................................................................. 215 Register Descriptions........................................................................................................ 217 9.2.1 Watchdog Timer Counter (WTCNT)................................................................ 217 9.2.2 Watchdog Timer Control/Status Register (WTCSR)........................................ 217 9.2.3 Notes on Register Access ................................................................................. 219 WDT Operation ................................................................................................................ 220 9.3.1 Canceling Software Standbys ........................................................................... 220 9.3.2 Changing Frequency ......................................................................................... 221 9.3.3 Using Watchdog Timer Mode .......................................................................... 221 9.3.4 Using Interval Timer Mode .............................................................................. 222 Usage Notes ...................................................................................................................... 222
9.3
9.4
Section 10 Power-Down Modes........................................................................ 223
10.1 10.2 10.3 Features............................................................................................................................. 223 10.1.1 Types of Power-Down Modes .......................................................................... 223 Input/Output Pins.............................................................................................................. 224 Register Descriptions........................................................................................................ 224 10.3.1 Standby Control Register (STBCR).................................................................. 225
Rev. 6.00 Jul. 15, 2009 Page xii of xxxviii
10.4
10.5
10.6
10.3.2 Standby Control Register 2 (STBCR2)............................................................. 226 10.3.3 Standby Control Register 3 (STBCR3)............................................................. 227 10.3.4 Standby Control Register 4 (STBCR4)............................................................. 228 Sleep Mode ....................................................................................................................... 229 10.4.1 Transition to Sleep Mode.................................................................................. 229 10.4.2 Canceling Sleep Mode ...................................................................................... 229 Software Standby Mode.................................................................................................... 230 10.5.1 Transition to Software Standby Mode .............................................................. 230 10.5.2 Canceling Software Standby Mode................................................................... 231 Module Standby Mode...................................................................................................... 232 10.6.1 Transition to Module Standby Mode ................................................................ 232 10.6.2 Canceling Module Standby Function................................................................ 232
Section 11 Ethernet Controller (EtherC)............................................................233
11.1 11.2 11.3 Features............................................................................................................................. 233 Input/Output Pins.............................................................................................................. 235 Register Description ......................................................................................................... 237 11.3.1 EtherC Mode Register (ECMR)........................................................................ 238 11.3.2 EtherC Status Register (ECSR)......................................................................... 241 11.3.3 EtherC Interrupt Permission Register (ECSIPR) .............................................. 243 11.3.4 PHY Interface Register (PIR) ........................................................................... 244 11.3.5 MAC Address High Register (MAHR)............................................................. 245 11.3.6 MAC Address Low Register (MALR).............................................................. 245 11.3.7 Receive Frame Length Register (RFLR) .......................................................... 246 11.3.8 PHY Status Register (PSR)............................................................................... 247 11.3.9 Transmit Retry Over Counter Register (TROCR) ............................................ 247 11.3.10 Delayed Collision Detect Counter Register (CDCR)........................................ 248 11.3.11 Lost Carrier Counter Register (LCCR) ............................................................. 248 11.3.12 Carrier Not Detect Counter Register (CNDCR) ............................................... 248 11.3.13 CRC Error Frame Counter Register (CEFCR).................................................. 249 11.3.14 Frame Receive Error Counter Register (FRECR)............................................. 249 11.3.15 Too-Short Frame Receive Counter Register (TSFRCR)................................... 249 11.3.16 Too-Long Frame Receive Counter Register (TLFRCR)................................... 250 11.3.17 Residual-Bit Frame Counter Register (RFCR) ................................................. 250 11.3.18 Multicast Address Frame Counter Register (MAFCR)..................................... 250 11.3.19 IPG Register (IPGR) ......................................................................................... 251 11.3.20 Automatic PAUSE Frame Set Register (APR) ................................................. 251 11.3.21 Manual PAUSE Frame Set Register (MPR) ..................................................... 252 11.3.22 PAUSE Frame Retransfer Count Set Register (TPAUSER)............................. 252 Operation .......................................................................................................................... 253
Rev. 6.00 Jul. 15, 2009 Page xiii of xxxviii
11.4
11.5 11.6
11.4.1 Transmission..................................................................................................... 253 11.4.2 Reception .......................................................................................................... 255 11.4.3 MII Frame Timing ............................................................................................ 256 11.4.4 Accessing MII Registers................................................................................... 258 11.4.5 Magic Packet Detection .................................................................................... 261 11.4.6 Operation by IPG Setting.................................................................................. 262 11.4.7 Flow Control..................................................................................................... 262 Connection to PHY-LSI.................................................................................................... 263 Usage Notes ...................................................................................................................... 264
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)....................................................................................... 267
12.1 12.2 Features............................................................................................................................. 267 Register Descriptions........................................................................................................ 268 12.2.1 E-DMAC Mode Register (EDMR) ................................................................... 269 12.2.2 E-DMAC Transmit Request Register (EDTRR) .............................................. 270 12.2.3 E-DMAC Receive Request Register (EDRRR)................................................ 271 12.2.4 Transmit Descriptor List Address Register (TDLAR)...................................... 272 12.2.5 Receive Descriptor List Address Register (RDLAR) ....................................... 272 12.2.6 EtherC/E-DMAC Status Register (EESR)........................................................ 273 12.2.7 EtherC/E-DMAC Status Interrupt Permission Register (EESIPR)................... 278 12.2.8 Transmit/Receive Status Copy Enable Register (TRSCER)............................. 281 12.2.9 Receive Missed-Frame Counter Register (RMFCR) ........................................ 283 12.2.10 Transmit FIFO Threshold Register (TFTR)...................................................... 284 12.2.11 FIFO Depth Register (FDR) ............................................................................. 285 12.2.12 Receiving Method Control Register (RMCR) .................................................. 286 12.2.13 E-DMAC Operation Control Register (EDOCR) ............................................. 287 12.2.14 Receiving-Buffer Write Address Register (RBWAR) ...................................... 288 12.2.15 Receiving-Descriptor Fetch Address Register (RDFAR) ................................. 288 12.2.16 Transmission-Buffer Read Address Register (TBRAR)................................... 288 12.2.17 Transmission-Descriptor Fetch Address Register (TDFAR) ............................ 289 12.2.18 Flow Control FIFO Threshold Register (FCFTR) ............................................ 289 12.2.19 Transmit Interrupt Register (TRIMD) .............................................................. 290 Operation .......................................................................................................................... 291 12.3.1 Descriptor List and Data Buffers ...................................................................... 291 12.3.2 Transmission..................................................................................................... 300 12.3.3 Reception .......................................................................................................... 302 12.3.4 Multi-Buffer Frame Transmit/Receive Processing ........................................... 304 Usage Notes ...................................................................................................................... 306 12.4.1 Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR).............. 306
12.3
12.4
Rev. 6.00 Jul. 15, 2009 Page xiv of xxxviii
12.4.2
Usage Notes on SH-Ether Transmit-FIFO Underflow...................................... 315
Section 13 Direct Memory Access Controller (DMAC) ...................................325
13.1 13.2 13.3 Features............................................................................................................................. 325 Input/Output Pins.............................................................................................................. 327 Register Descriptions........................................................................................................ 328 13.3.1 DMA Source Address Registers 0 to 3 (SAR_0 to SAR_3) ............................. 329 13.3.2 DMA Destination Address Registers 0 to 3 (DAR_0 to DAR_3) .................... 329 13.3.3 DMA Transfer Count Registers 0 to 3 (DMATCR_0 to DMATCR_3) ........... 329 13.3.4 DMA Channel Control Registers 0 to 3 (CHCR_0 to CHCR_3)...................... 330 13.3.5 DMA Operation Register (DMAOR) ............................................................... 336 13.3.6 DMA Extended Resource Selectors 0 and 1 (DMARS0 and DMARS1) ......... 339 Operation .......................................................................................................................... 341 13.4.1 DMA Transfer Flow ......................................................................................... 341 13.4.2 DMA Transfer Requests ................................................................................... 343 13.4.3 Channel Priority................................................................................................ 345 13.4.4 DMA Transfer Types........................................................................................ 348 13.4.5 Number of Bus Cycle States and DREQ Pin Sampling Timing ....................... 357 Usage Notes ...................................................................................................................... 361 13.5.1 Notes on DACK Pin Output ............................................................................. 361 13.5.2 Notes On DREQ Sampling When DACK is Divided in External Access ........ 362 13.5.3 Other Notes ....................................................................................................... 365
13.4
13.5
Section 14 Compare Match Timer (CMT) ........................................................367
14.1 14.2 Features............................................................................................................................. 367 Register Descriptions........................................................................................................ 368 14.2.1 Compare Match Timer Start Register (CMSTR) .............................................. 368 14.2.2 Compare Match Timer Control/Status Register (CMCSR) .............................. 369 14.2.3 Compare Match Counter (CMCNT) ................................................................. 370 14.2.4 Compare Match Constant Register (CMCOR) ................................................. 370 Operation .......................................................................................................................... 371 14.3.1 Interval Count Operation .................................................................................. 371 14.3.2 CMCNT Count Timing..................................................................................... 371 Interrupts........................................................................................................................... 372 14.4.1 Interrupt Sources............................................................................................... 372 14.4.2 Timing of Setting Compare Match Flag ........................................................... 372 14.4.3 Timing of Clearing Compare Match Flag......................................................... 372 Usage Notes ...................................................................................................................... 373 14.5.1 Conflict between Write and Compare-Match Processes of CMCNT ............... 373 14.5.2 Conflict between Word-Write and Count-Up Processes of CMCNT ............... 374
Rev. 6.00 Jul. 15, 2009 Page xv of xxxviii
14.3
14.4
14.5
14.5.3 14.5.4
Conflict between Byte-Write and Count-Up Processes of CMCNT................. 375 Conflict between Write Processes to CMCNT with the Counting Stopped and CMCOR........................................................................ 375
Section 15 Serial Communication Interface with FIFO (SCIF)........................ 377
15.1 15.2 15.3 Overview .......................................................................................................................... 377 15.1.1 Features............................................................................................................. 377 Pin Configuration.............................................................................................................. 380 Register Description ......................................................................................................... 381 15.3.1 Receive Shift Register (SCRSR) ...................................................................... 382 15.3.2 Receive FIFO Data Register (SCFRDR) .......................................................... 382 15.3.3 Transmit Shift Register (SCTSR) ..................................................................... 382 15.3.4 Transmit FIFO Data Register (SCFTDR)......................................................... 383 15.3.5 Serial Mode Register (SCSMR)........................................................................ 383 15.3.6 Serial Control Register (SCSCR)...................................................................... 386 15.3.7 Serial Status Register (SCFSR) ........................................................................ 390 15.3.8 Bit Rate Register (SCBRR) .............................................................................. 398 15.3.9 FIFO Control Register (SCFCR) ...................................................................... 405 15.3.10 FIFO Data Count Register (SCFDR)................................................................ 408 15.3.11 Serial Port Register (SCSPTR) ......................................................................... 409 15.3.12 Line Status Register (SCLSR) .......................................................................... 413 Operation .......................................................................................................................... 414 15.4.1 Overview .......................................................................................................... 414 15.4.2 Operation in Asynchronous Mode .................................................................... 416 15.4.3 Synchronous Mode ........................................................................................... 427 SCIF Interrupts ................................................................................................................. 435 Serial Port Register (SCSPTR) and SCIF Pins ................................................................. 436 Usage Notes ...................................................................................................................... 440
15.4
15.5 15.6 15.7
Section 16 Serial I/O with FIFO (SIOF) ........................................................... 445
16.1 16.2 16.3 Features............................................................................................................................. 445 Input/Output Pins.............................................................................................................. 447 Register Descriptions........................................................................................................ 448 16.3.1 Mode Register (SIMDR) .................................................................................. 449 16.3.2 Control Register (SICTR)................................................................................. 452 16.3.3 Transmit Data Register (SITDR) ...................................................................... 455 16.3.4 Receive Data Register (SIRDR) ....................................................................... 456 16.3.5 Transmit Control Data Register (SITCR) ......................................................... 457 16.3.6 Receive Control Data Register (SIRCR) .......................................................... 458 16.3.7 Status Register (SISTR).................................................................................... 459
Rev. 6.00 Jul. 15, 2009 Page xvi of xxxviii
16.4
16.3.8 Interrupt Enable Register (SIIER)..................................................................... 465 16.3.9 FIFO Control Register (SIFCTR) ..................................................................... 467 16.3.10 Clock Select Register (SISCR) ......................................................................... 469 16.3.11 Transmit Data Assign Register (SITDAR) ....................................................... 470 16.3.12 Receive Data Assign Register (SIRDAR)......................................................... 472 16.3.13 Control Data Assign Register (SICDAR) ......................................................... 473 16.3.14 SPI Control Register (SPICR) .......................................................................... 474 Operation .......................................................................................................................... 477 16.4.1 Serial Clocks ..................................................................................................... 477 16.4.2 Serial Timing .................................................................................................... 478 16.4.3 Transfer Data Format........................................................................................ 479 16.4.4 Register Allocation of Transfer Data ................................................................ 481 16.4.5 Control Data Interface....................................................................................... 483 16.4.6 FIFO.................................................................................................................. 485 16.4.7 Transmit and Receive Procedures..................................................................... 487 16.4.8 Interrupts........................................................................................................... 494 16.4.9 Transmit and Receive Timing........................................................................... 496 16.4.10 SPI Mode .......................................................................................................... 502
Section 17 Host Interface (HIF).........................................................................511
17.1 17.2 17.3 Features............................................................................................................................. 511 Input/Output Pins.............................................................................................................. 513 Parallel Access.................................................................................................................. 514 17.3.1 Operation .......................................................................................................... 514 17.3.2 Connection Method........................................................................................... 514 Register Descriptions........................................................................................................ 515 17.4.1 HIF Index Register (HIFIDX)........................................................................... 515 17.4.2 HIF General Status Register (HIFGSR)............................................................ 518 17.4.3 HIF Status/Control Register (HIFSCR) ............................................................ 518 17.4.4 HIF Memory Control Register (HIFMCR) ....................................................... 521 17.4.5 HIF Internal Interrupt Control Register (HIFIICR) .......................................... 523 17.4.6 HIF External Interrupt Control Register (HIFEICR) ........................................ 523 17.4.7 HIF Address Register (HIFADR) ..................................................................... 524 17.4.8 HIF Data Register (HIFDATA) ........................................................................ 525 17.4.9 HIF Boot Control Register (HIFBCR).............................................................. 525 17.4.10 HIFDREQ Trigger Register (HIFDTR) ............................................................ 526 17.4.11 HIF Bank Interrupt Control Register (HIFBICR) ............................................. 527 Memory Map .................................................................................................................... 529 Interface (Basic)................................................................................................................ 530 Interface (Details) ............................................................................................................. 531
Rev. 6.00 Jul. 15, 2009 Page xvii of xxxviii
17.4
17.5 17.6 17.7
17.7.1 HIFIDX Write/HIFGSR Read .......................................................................... 531 17.7.2 Reading/Writing of HIF Registers other than HIFIDX and HIFGSR............... 531 17.7.3 Consecutive Data Writing to HIFRAM by External Device............................. 532 17.7.4 Consecutive Data Reading from HIFRAM to External Device ........................ 532 17.8 External DMAC Interface................................................................................................. 533 17.9 Alignment Control ............................................................................................................ 539 17.10 Interface When External Device Power is Cut Off........................................................... 540
Section 18 Pin Function Controller (PFC) ........................................................ 543
18.1 Register Descriptions........................................................................................................ 553 18.1.1 Port A IO Register H (PAIORH) ...................................................................... 554 18.1.2 Port A Control Register H1 and H2 (PACRH1 and PACRH2) ........................ 554 18.1.3 Port B IO Register L (PBIORL) ....................................................................... 557 18.1.4 Port B Control Register L1 and L2 (PBCRL1 and PBCRL2)........................... 557 18.1.5 Port C IO Register H and L (PCIORH and PCIORL) ...................................... 561 18.1.6 Port C Control Register H2, L1, and L2 (PCCRH2, PCCRL1, and PCCRL2)................................................................. 561 18.1.7 Port D IO Register L (PDIORL)....................................................................... 566 18.1.8 Port D Control Register L2 (PDCRL2)............................................................. 567 18.1.9 Port E IO Register H and L (PEIORH and PEIORL) ....................................... 569 18.1.10 Port E Control Register H1, H2, L1, and L2 (PECRH1, PECRH2, PECRL1, and PECRL2)................................................. 569 Notes on Usage ................................................................................................................. 577 18.2.1 Restriction in Using .......................................................................................... 577 18.2.2 Details of Restriction ........................................................................................ 577
18.2
Section 19 I/O Ports........................................................................................... 579
19.1 Port A................................................................................................................................ 579 19.1.1 Register Description ......................................................................................... 579 19.1.2 Port A Data Register H (PADRH) .................................................................... 579 Port B................................................................................................................................ 581 19.2.1 Register Description ......................................................................................... 581 19.2.2 Port B Data Register L (PBDRL) ..................................................................... 581 Port C................................................................................................................................ 583 19.3.1 Register Description ......................................................................................... 584 19.3.2 Port C Data Registers H and L (PCDRH and PCDRL) .................................... 584 Port D................................................................................................................................ 586 19.4.1 Register Description ......................................................................................... 586 19.4.2 Port D Data Register L (PDDRL)..................................................................... 586 Port E ................................................................................................................................ 588
19.2
19.3
19.4
19.5
Rev. 6.00 Jul. 15, 2009 Page xviii of xxxviii
19.6
19.5.1 Register Description ......................................................................................... 589 19.5.2 Port E Data Registers H and L (PEDRH and PEDRL) ..................................... 589 Usage Notes ...................................................................................................................... 591
Section 20 User Break Controller (UBC) ..........................................................593
20.1 20.2 Features............................................................................................................................. 593 Register Descriptions........................................................................................................ 595 20.2.1 Break Address Register A (BARA) .................................................................. 595 20.2.2 Break Address Mask Register A (BAMRA)..................................................... 596 20.2.3 Break Bus Cycle Register A (BBRA)............................................................... 596 20.2.4 Break Address Register B (BARB) .................................................................. 597 20.2.5 Break Address Mask Register B (BAMRB) ..................................................... 598 20.2.6 Break Data Register B (BDRB) ........................................................................ 598 20.2.7 Break Data Mask Register B (BDMRB)........................................................... 599 20.2.8 Break Bus Cycle Register B (BBRB) ............................................................... 599 20.2.9 Break Control Register (BRCR) ....................................................................... 601 20.2.10 Execution Times Break Register (BETR)......................................................... 604 20.2.11 Branch Source Register (BRSR)....................................................................... 604 20.2.12 Branch Destination Register (BRDR)............................................................... 605 Operation .......................................................................................................................... 606 20.3.1 Flow of User Break Operation .......................................................................... 606 20.3.2 Break on Instruction Fetch Cycle...................................................................... 607 20.3.3 Break on Data Access Cycle............................................................................. 607 20.3.4 Sequential Break ............................................................................................... 608 20.3.5 Value of Saved Program Counter (PC)............................................................. 608 20.3.6 PC Trace ........................................................................................................... 609 20.3.7 Usage Examples................................................................................................ 610 20.3.8 Notes ................................................................................................................. 614
20.3
Section 21 User Debugging Interface (H-UDI) .................................................615
21.1 21.2 21.3 Features............................................................................................................................. 615 Input/Output Pins.............................................................................................................. 616 Register Descriptions........................................................................................................ 617 21.3.1 Bypass Register (SDBPR) ................................................................................ 617 21.3.2 Instruction Register (SDIR) .............................................................................. 617 21.3.3 Boundary Scan Register (SDBSR) ................................................................... 618 21.3.4 ID Register (SDID)........................................................................................... 625 Operation .......................................................................................................................... 626 21.4.1 TAP Controller ................................................................................................. 626 21.4.2 Reset Configuration .......................................................................................... 627
Rev. 6.00 Jul. 15, 2009 Page xix of xxxviii
21.4
21.5
21.6
21.4.3 TDO Output Timing ......................................................................................... 627 21.4.4 H-UDI Reset ..................................................................................................... 628 21.4.5 H-UDI Interrupt ................................................................................................ 628 Boundary Scan.................................................................................................................. 629 21.5.1 Supported Instructions ...................................................................................... 629 21.5.2 Points for Attention........................................................................................... 630 Usage Notes ...................................................................................................................... 630
Section 22 Ethernet Physical Layer Transceiver (PHY) ................................... 631
22.1 22.2 22.3 22.4 Features............................................................................................................................. 631 Pin Configuration.............................................................................................................. 633 Top Level Functional Architecture................................................................................... 634 PHY Management Control ............................................................................................... 635 22.4.1 Serial Management Interface (SMI) ................................................................. 635 22.4.2 SMI Register Mapping...................................................................................... 642 100Base-TX Transmit....................................................................................................... 648 100Base-TX Receive ........................................................................................................ 651 10Base-T Transmit ........................................................................................................... 654 10Base-T Receive............................................................................................................. 656 MAC Interface .................................................................................................................. 657 Miscellaneous Functions................................................................................................... 661 Internal I/O Signals........................................................................................................... 665 Signals Relevant to PHY-IF ............................................................................................. 667 Usage Notes ...................................................................................................................... 668 Guidelines for Layout ....................................................................................................... 678 22.14.1 General Guidelines ........................................................................................... 678 22.14.2 Guidelines for Layout ....................................................................................... 679
22.5 22.6 22.7 22.8 22.9 22.10 22.11 22.12 22.13 22.14
Section 23 PHY Interface (PHY-IF) ................................................................. 683
23.1 23.2 Features............................................................................................................................. 683 Register Descriptions........................................................................................................ 685 23.2.1 PHY-IF Control Register (PHYIFCR).............................................................. 685 23.2.2 PHY-IF SMI Register 2 (PHYIFSMIR2) ......................................................... 686 23.2.3 PHY-IF SMI Register 3 (PHYIFSMIR3) ......................................................... 687 23.2.4 PHY-IF Address Register (PHYIFADDRR) .................................................... 687 23.2.5 PHY-IF status Register (PHYIFSR) ................................................................. 688 PHY-IF Operation ............................................................................................................ 689 23.3.1 The Procedures of Setting Up the On-Chip PHY ............................................. 689 23.3.2 The Procedures of Set Up the External PHY LSI ............................................. 690
23.3
Rev. 6.00 Jul. 15, 2009 Page xx of xxxviii
Section 24 List of Registers ...............................................................................691
24.1 24.2 24.3 Register Addresses (Address Order)................................................................................. 692 Register Bits...................................................................................................................... 700 Register States in Each Processing State .......................................................................... 722
Section 25 Electrical Characteristics .................................................................729
25.1 25.2 25.3 25.4 Absolute Maximum Ratings ............................................................................................. 729 Power-On and Power-Off Order ....................................................................................... 730 DC Characteristics ............................................................................................................ 732 AC Characteristics ............................................................................................................ 734 25.4.1 Clock Timing .................................................................................................... 735 25.4.2 Control Signal Timing ...................................................................................... 739 25.4.3 AC Bus Timing................................................................................................. 741 25.4.4 Basic Timing..................................................................................................... 743 25.4.5 Synchronous DRAM Timing ............................................................................ 749 25.4.6 PCMCIA Timing .............................................................................................. 766 25.4.7 DMAC Signal Timing....................................................................................... 770 25.4.8 SCIF Timing ..................................................................................................... 771 25.4.9 SIOF Module Signal Timing ............................................................................ 772 25.4.10 Port Timing ....................................................................................................... 776 25.4.11 HIF Timing ....................................................................................................... 777 25.4.12 EtherC Timing .................................................................................................. 780 25.4.13 H-UDI Related Pin Timing............................................................................... 783 25.4.14 AC Characteristic Test Conditions ................................................................... 785 Physical Layer Ttransceiver (PHY) Characteristics (Reference Values).......................... 786
25.5
Appendix..............................................................................................................787
A. B. C. Port States in Each Pin State............................................................................................. 787 Product Code Lineup ........................................................................................................ 792 Package Dimensions ......................................................................................................... 793
Main Revisions and Additions in this Edition .....................................................795 Index ....................................................................................................................809
Rev. 6.00 Jul. 15, 2009 Page xxi of xxxviii
Rev. 6.00 Jul. 15, 2009 Page xxii of xxxviii
Figures
Section 1 Overview Figure 1.1 Block Diagram .............................................................................................................. 7 Figure 1.2 Pin Assignments ............................................................................................................ 8 Section 2 Figure 2.1 Figure 2.2 Figure 2.3 Figure 2.4 Section 3 Figure 3.1 Figure 3.2 Figure 3.3 Figure 3.4 Section 6 Figure 6.1 Figure 6.2 Figure 6.3 Figure 6.4 Section 7 Figure 7.1 Figure 7.2 Figure 7.3 Figure 7.4 CPU CPU Internal Register Configuration .......................................................................... 24 Register Data Format................................................................................................... 28 Memory Data Format .................................................................................................. 28 CPU State Transition................................................................................................... 51 Cache Cache Structure ........................................................................................................... 53 Cache Search Scheme ................................................................................................. 58 Write-Back Buffer Configuration................................................................................ 59 Specifying Address and Data for Memory-Mapped Cache Access............................. 62 Interrupt Controller (INTC) INTC Block Diagram .................................................................................................. 84 Block Diagram of IRQ7 to IRQ0 Interrupts Control................................................... 98 Interrupt Sequence Flowchart.................................................................................... 103 Stack after Interrupt Exception Handling .................................................................. 104
Bus State Controller (BSC) Block Diagram of BSC.............................................................................................. 109 Address Space ........................................................................................................... 112 Normal Space Basic Access Timing (No-Wait Access)............................................ 149 Consecutive Access to Normal Space (1): Bus Width = 16 bits, Longword Access, CSnWCR.WM = 0 (Access Wait = 0, Cycle Wait = 0) ............. 150 Figure 7.5 Consecutive Access to Normal Space (2): Bus Width = 16 bits, Longword Access, CSnWCR.WM = 1 (Access Wait = 0, Cycle Wait = 0) ............. 151 Figure 7.6 Example of 32-Bit Data-Width SRAM Connection .................................................. 152 Figure 7.7 Example of 16-Bit Data-Width SRAM Connection .................................................. 153 Figure 7.8 Example of 8-Bit Data-Width SRAM Connection.................................................... 153 Figure 7.9 Wait Timing for Normal Space Access (Software Wait Only) ................................. 154 Figure 7.10 Wait Cycle Timing for Normal Space Access (Wait cycle Insertion using WAIT)......................................................................... 155 Figure 7.11 Example of Timing when CSn Assertion Period is Extended ................................. 156 Figure 7.12 Example of 32-Bit Data-Width SDRAM Connection ............................................. 158 Figure 7.13 Example of 16-Bit Data-Width SDRAM Connection ............................................. 159
Rev. 6.00 Jul. 15, 2009 Page xxiii of xxxviii
Figure 7.14 Figure 7.15 Figure 7.16 Figure 7.17 Figure 7.18 Figure 7.19 Figure 7.20 Figure 7.21 Figure 7.22 Figure 7.23 Figure 7.24 Figure 7.25 Figure 7.26 Figure 7.27 Figure 7.28 Figure 7.29 Figure 7.30 Figure 7.31 Figure 7.32 Figure 7.33 Figure 7.34 Figure 7.35 Figure 7.36 Figure 7.37 Figure 7.38 Figure 7.39 Section 8 Figure 8.1 Figure 8.2 Figure 8.3
Burst Read Basic Timing (Auto Precharge) ............................................................ 170 Burst Read Wait Specification Timing (Auto Precharge) ....................................... 171 Basic Timing for Single Read (Auto Precharge)..................................................... 172 Basic Timing for Burst Write (Auto Precharge) ..................................................... 173 Basic Timing for Single Write (Auto-Precharge).................................................... 174 Burst Read Timing (No Auto Precharge) ................................................................ 176 Burst Read Timing (Bank Active, Same Row Address) ......................................... 177 Burst Read Timing (Bank Active, Different Row Addresses) ................................ 178 Single Write Timing (No Auto Precharge).............................................................. 179 Single Write Timing (Bank Active, Same Row Address)....................................... 180 Single Write Timing (Bank Active, Different Row Addresses).............................. 181 Auto-Refreshing Timing ......................................................................................... 182 Self-Refreshing Timing........................................................................................... 184 Write Timing for SDRAM Mode Register (Based on JEDEC)............................... 186 Basic Access Timing for Byte-Selection SRAM (BAS = 0)................................... 187 Basic Access Timing for Byte-Selection SRAM (BAS = 1)................................... 188 Wait Timing for Byte-Selection SRAM (BAS = 1) (Software Wait Only)............. 189 Example of Connection with 32-Bit Data-Width Byte-Selection SRAM ............... 190 Example of Connection with 16-Bit Data-Width Byte-Selection SRAM ............... 190 Example of PCMCIA Interface Connection............................................................ 192 Basic Access Timing for PCMCIA Memory Card Interface................................... 193 Wait Timing for PCMCIA Memory Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Wait = 1, Hardware Wait = 1) ................................ 194 Example of PCMCIA Space Assignment (CS5BWCR.SA[1:0] = B'10, CS6BWCR.SA[1:0] = B'10) ................................................................................... 195 Basic Timing for PCMCIA I/O Card Interface ....................................................... 196 Wait Timing for PCMCIA I/O Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Wait = 1, Hardware Wait = 1) ................................ 197 Timing for Dynamic Bus Sizing of PCMCIA I/O Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Waits = 3) ............................. 197
Clock Pulse Generator (CPG) Block Diagram of CPG ............................................................................................. 202 Note on Using a Crystal Resonator ........................................................................... 213 Note on Using a PLL Oscillator Circuit .................................................................... 214
Section 9 Watchdog Timer (WDT) Figure 9.1 Block Diagram of WDT ............................................................................................ 216 Figure 9.2 Writing to WTCNT and WTCSR.............................................................................. 220 Section 10 Power-Down Modes Figure 10.1 Canceling Standby Mode with STBY Bit in STBCR.............................................. 232
Rev. 6.00 Jul. 15, 2009 Page xxiv of xxxviii
Section 11 Ethernet Controller (EtherC) Figure 11.1 Configuration of EtherC.......................................................................................... 234 Figure 11.2 EtherC Transmitter State Transitions ...................................................................... 254 Figure 11.3 EtherC Receiver State Transmissions...................................................................... 255 Figure 11.4 (1) MII Frame Transmit Timing (Normal Transmission)........................................ 256 Figure 11.4 (2) MII Frame Transmit Timing (Collision)............................................................ 256 Figure 11.4 (3) MII Frame Transmit Timing (Transmit Error)................................................... 257 Figure 11.4 (4) MII Frame Receive Timing (Normal Reception)............................................... 257 Figure 11.4 (5) MII Frame Receive Timing (Reception Error (1))............................................. 257 Figure 11.4 (6) MII Fame Receive Timing (Reception Error (2)) .............................................. 257 Figure 11.5 MII Management Frame Format ............................................................................. 258 Figure 11.6 (1) 1-Bit Data Write Flowchart ............................................................................... 259 Figure 11.6 (2) Bus Release Flowchart (TA in Read in Figure 11.5) ......................................... 260 Figure 11.6 (3) 1-Bit Data Read Flowchart ................................................................................ 260 Figure 11.6 (4) Independent Bus Release Flowchart (IDLE in Write in Figure 11.5)................ 261 Figure 11.7 Changing IPG and Transmission Efficiency ........................................................... 262 Figure 11.8 Example of Connection to DP83846AVHG............................................................ 263 Section 12 Figure 12.1 Figure 12.2 Figure 12.3 Figure 12.4 Figure 12.5 Figure 12.6 Figure 12.7 Figure 12.8 Ethernet Controller Direct Memory Access Controller (E-DMAC) Configuration of E-DMAC, and Descriptors and Buffers....................................... 267 Relationship between Transmit Descriptor and Transmit Buffer ............................ 292 Relationship between Receive Descriptor and Receive Buffer ............................... 296 Sample Transmission Flowchart ............................................................................. 301 Sample Reception Flowchart................................................................................... 303 E-DMAC Operation after Transmit Error ............................................................... 304 E-DMAC Operation after Receive Error................................................................. 305 Timing of the Case where Setting of the Interrupt Source Bit in EESR by the E-DMAC Fails................................................................................................... 306 Figure 12.9 Countermeasure by Monitoring the Transmit Descriptor in Processing of Interrupts Other than the Frame Transmit Complete (TC) Interrupt ....................... 312 Figure 12.10 Method of Adding Timeout Processing................................................................. 314 Figure 12.11 Operation when E-DMAC Stops and the Transmit FIFO ..................................... 316 Figure 12.12 Processing Transmission without Handling of the TC Interrupt ........................... 319 Figure 12.13 Countermeasure for the Case with TC Interrupt-Driven Software: Addition of Timeout Processing within the Limit Imposed by the Maximum Specified Time .............................................................................. 322 Section 13 Figure 13.1 Figure 13.2 Figure 13.3 Direct Memory Access Controller (DMAC) Block Diagram of DMAC ....................................................................................... 326 DMA Transfer Flowchart ........................................................................................ 342 Round-Robin Mode................................................................................................. 346
Rev. 6.00 Jul. 15, 2009 Page xxv of xxxviii
Figure 13.4 Changes in Channel Priority in Round-Robin Mode............................................... 347 Figure 13.5 Data Flow of Dual Address Mode........................................................................... 349 Figure 13.6 Example of DMA Transfer Timing in Dual Mode (Source: Ordinary Memory, Destination: Ordinary Memory) ................................ 350 Figure 13.7 Data Flow in Single Address Mode......................................................................... 351 Figure 13.8 Example of DMA Transfer Timing in Single Address Mode ................................. 352 Figure 13.9 DMA Transfer Example in Cycle-Steal Normal Mode (Dual Address, DREQ Low Level Detection) ........................................................ 353 Figure 13.10 Example of DMA Transfer in Cycle Steal Intermittent Mode (Dual Address, DREQ Low Level Detection)....................................................... 354 Figure 13.11 DMA Transfer Example in Burst Mode (Dual Address, DREQ Low Level Detection)....................................................... 354 Figure 13.12 Bus State when Multiple Channels are Operating................................................. 356 Figure 13.13 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection............ 357 Figure 13.14 Example of DREQ Input Detection in Cycle Steal Mode Level Detection........... 357 Figure 13.15 Example of DREQ Input Detection in Burst Mode Edge Detection ..................... 358 Figure 13.16 Example of DREQ Input Detection in Burst Mode Level Detection .................... 358 Figure 13.17 Example of DMA Transfer End in Cycle Steal Mode Level Detection ................ 359 Figure 13.18 Example of BSC Ordinary Memory Access (No Wait, Idle Cycle 1, Longword Access to 16-Bit Device) ............................... 360 Figure 13.19 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection When DACK is Divided to 4 by Idle Cycles ................................................................... 362 Figure 13.20 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection When DACK is Divided to 2 by Idle Cycles ................................................................... 363 Figure 13.21 Example of DREQ Input Detection in Cycle Steal Mode Level Detection When DACK is Divided to 4 by Idle Cycles ................................................................... 363 Figure 13.22 Example of DREQ Input Detection in Cycle Steal Mode Level Detection When DACK is Divided to 2 by Idle Cycles ................................................................... 364 Section 14 Figure 14.1 Figure 14.2 Figure 14.3 Figure 14.4 Figure 14.5 Figure 14.6 Figure 14.7 Compare Match Timer (CMT) Block Diagram of Compare Match Timer............................................................... 367 Counter Operation ................................................................................................... 371 Count Timing .......................................................................................................... 371 Timing of CMF Setting ........................................................................................... 372 Conflict between Write and Compare-Match Processes of CMCNT...................... 373 Conflict between Word-Write and Count-Up Processes of CMCNT...................... 374 Conflict between Byte-Write and Count-Up Processes of CMCNT ....................... 375
Rev. 6.00 Jul. 15, 2009 Page xxvi of xxxviii
Section 15 Serial Communication Interface with FIFO (SCIF) Figure 15.1 Block Diagram of SCIF........................................................................................... 379 Figure 15.2 Example of Data Format in Asynchronous Communication (8-Bit Data with Parity and Two Stop Bits) ............................................................ 416 Figure 15.3 Sample Flowchart for SCIF Initialization ............................................................... 419 Figure 15.4 Sample Flowchart for Transmitting Serial Data ...................................................... 420 Figure 15.5 Example of Transmit Operation (8-Bit Data, Parity, One Stop Bit)........................ 422 Figure 15.6 Example of Operation Using Modem Control (CTS).............................................. 422 Figure 15.7 Sample Flowchart for Receiving Serial Data (1)..................................................... 423 Figure 15.8 Sample Flowchart for Receiving Serial Data (2)..................................................... 424 Figure 15.9 Example of SCIF Receive Operation (8-Bit Data, Parity, One Stop Bit)................ 426 Figure 15.10 Example of Operation Using Modem Control (RTS)............................................ 426 Figure 15.11 Data Format in Synchronous Communication ...................................................... 427 Figure 15.12 Sample Flowchart for SCIF Initialization.............................................................. 429 Figure 15.13 Sample Flowchart for Transmitting Serial Data .................................................... 430 Figure 15.14 Example of SCIF Transmit Operation................................................................... 431 Figure 15.15 Sample Flowchart for Receiving Serial Data (1)................................................... 432 Figure 15.16 Sample Flowchart for Receiving Serial Data (2)................................................... 432 Figure 15.17 Example of SCIF Receive Operation .................................................................... 433 Figure 15.18 Sample Flowchart for Transmitting/Receiving Serial Data................................... 434 Figure 15.19 RTSIO Bit, RTSDT Bit, and RTS Pin................................................................... 436 Figure 15.20 CTSIO Bit, CTSDT Bit, and CTS Pin................................................................... 437 Figure 15.21 SCKIO Bit, SCKDT Bit, and SCK Pin ................................................................. 438 Figure 15.22 SPBIO Bit, SPBDT Bit, and TxD Pin ................................................................... 438 Figure 15.23 SPBDT Bit and RxD Pin ....................................................................................... 439 Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode ...................................... 441 Section 16 Serial I/O with FIFO (SIOF) Figure 16.1 Block Diagram of SIOF .......................................................................................... 446 Figure 16.2 Serial Clock Supply................................................................................................. 477 Figure 16.3 Serial Data Synchronization Timing ....................................................................... 478 Figure 16.4 SIOF Transmit/Receive Timing .............................................................................. 479 Figure 16.5 Transmit/Receive Data Bit Alignment .................................................................... 481 Figure 16.6 Control Data Bit Alignment .................................................................................... 482 Figure 16.7 Control Data Interface (Slot Position) ..................................................................... 483 Figure 16.8 Control Data Interface (Secondary FS) ................................................................... 484 Figure 16.9 (1) Transmission/Reception Operation in Master Mode (Example of Reception and Full-Duplex Transmission by the CPU with TDMAE=0)................................. 488 Figure 16.9 (2) Transmission Operation in Master Mode (Example of Half-Duplex Transmission by the CPU with TDMAE=0) ........... 489
Rev. 6.00 Jul. 15, 2009 Page xxvii of xxxviii
Figure 16.10 Figure 16.11 Figure 16.12 Figure 16.13 Figure 16.14 Figure 16.15 Figure 16.16 Figure 16.17 Figure 16.18 Figure 16.19 Figure 16.20 Figure 16.21 Figure 16.22 Figure 16.23 Figure 16.24
Example of Receive Operation in Master Mode ................................................... 490 Example of Transmit Operation in Slave Mode .................................................... 491 Example of Receive Operation in Slave Mode ..................................................... 492 Transmit and Receive Timing (8-Bit Monaural Data (1))..................................... 496 Transmit and Receive Timing (8-Bit Monaural Data (2))..................................... 496 Transmit and Receive Timing (16-Bit Monaural Data (1))................................... 497 Transmit and Receive Timing (16-Bit Stereo Data (1)) ........................................ 497 Transmit and Receive Timing (16-Bit Stereo Data (2)) ........................................ 498 Transmit and Receive Timing (16-Bit Stereo Data (3)) ........................................ 498 Transmit and Receive Timing (16-Bit Stereo Data (4)) ........................................ 499 Transmit and Receive Timing (16-Bit Stereo Data).............................................. 499 Example of Configuration in SPI Mode ................................................................ 502 SPI Data/Clock Timing 1 (CPHA = 0).................................................................. 504 SPI Data/Clock Timing 2 (CPHA = 1).................................................................. 505 SPI Transmission/Reception Operation (Example of Full-Duplex Transmission/Reception by the CPU with TDMAE = 0)...................................... 506 Figure 16.25 SPI Transmission Operation (Example of Half-Duplex Transmission by the CPU with TDMAE = 0) ............. 507 Figure 16.26 SPI Transmission Operation (Example of Half-Duplex Transmission by DMA with TDMAE = 1) ................. 508 Figure 16.27 SPI Reception Operation (Example of Half-Duplex Reception by DMA with RDMAE = 1) ...................... 509 Section 17 Host Interface (HIF) Figure 17.1 Block Diagram of HIF............................................................................................. 512 Figure 17.2 HIF Connection Example........................................................................................ 514 Figure 17.3 Basic Timing for HIF Interface ............................................................................... 530 Figure 17.4 HIFIDX Write and HIFGSR Read .......................................................................... 531 Figure 17.5 HIF Register Settings .............................................................................................. 531 Figure 17.6 Consecutive Data Writing to HIFRAM................................................................... 532 Figure 17.7 Consecutive Data Reading from HIFRAM ............................................................. 533 Figure 17.8 HIFDREQ Timing (When DMD = 0 and DPOL = 0)............................................. 534 Figure 17.9 HIFDREQ Timing (When DMD = 0 and DPOL = 1)............................................. 534 Figure 17.10 HIFDREQ Timing (When DMD = 1 and DPOL = 0) ........................................... 535 Figure 17.11 HIFDREQ Timing (When DMD = 1 and DPOL = 1) ........................................... 535 Figure 17.12 Image of High-Impedance Control of HIF Pins by HIFEBL Pin .......................... 540 Section 19 Figure 19.1 Figure 19.2 Figure 19.3 I/O Ports Port A ...................................................................................................................... 579 Port B ...................................................................................................................... 581 Port C ...................................................................................................................... 583
Rev. 6.00 Jul. 15, 2009 Page xxviii of xxxviii
Figure 19.4 Port D ...................................................................................................................... 586 Figure 19.5 Port E....................................................................................................................... 588 Section 20 User Break Controller (UBC) Figure 20.1 Block Diagram of UBC........................................................................................... 594 Section 21 Figure 21.1 Figure 21.2 Figure 21.3 Figure 21.4 User Debugging Interface (H-UDI) Block Diagram of H-UDI........................................................................................ 615 TAP Controller State Transitions ............................................................................ 626 H-UDI Data Transfer Timing.................................................................................. 628 H-UDI Reset............................................................................................................ 628
Section 22 Ethernet Physical Layer Transceiver (PHY) Figure 22.1 The Block Diagram around PHY Module ............................................................... 632 Figure 22.2 Architectural Overview ........................................................................................... 634 Figure 22.3 How to Derive MDIO Signal from Core Signals .................................................... 635 Figure 22.4 MDIO Timing and Frame Structure (READ Cycle) ............................................... 636 Figure 22.5 MDIO Timing and Frame Structure (WRITE Cycle).............................................. 636 Figure 22.6 100Base-TX Data Path ............................................................................................ 648 Figure 22.7 Receive Data Path ................................................................................................... 651 Figure 22.8 Relationship between Received Data and Some MII Signals.................................. 653 Figure 22.9 Manchester Encoded Output ................................................................................... 655 Figure 22.10 Example of Connection with a Pulse Transformer (RJ45) .................................... 679 Section 23 PHY Interface (PHY-IF) Figure 23.1 Block Diagram of PHY-IF ...................................................................................... 684 Section 25 Electrical Characteristics Figure 25.1 External Clock Input Timing................................................................................... 736 Figure 25.2 CKIO Clock Output Timing and CK_PHY Clock Input Timing ............................ 736 Figure 25.3 Oscillation Settling Timing after Power-On............................................................ 737 Figure 25.4 Oscillation Settling Timing after Standby Mode (By Reset)................................... 737 Figure 25.5 Oscillation Settling Timing after Standby Mode (By NMI or IRQ)........................ 737 Figure 25.6 PLL Synchronize Settling Timing By Reset or NMI .............................................. 738 Figure 25.7 Reset Input Timing.................................................................................................. 739 Figure 25.8 Interrupt Input Timing............................................................................................. 740 Figure 25.9 Pin Drive Timing in Standby Mode ........................................................................ 740 Figure 25.10 Basic Bus Timing: No Wait Cycle ........................................................................ 743 Figure 25.11 Basic Bus Timing: One Software Wait Cycle ....................................................... 744 Figure 25.12 Basic Bus Timing: One External Wait Cycle ........................................................ 745 Figure 25.13 Basic Bus Timing: One Software Wait Cycle, External Wait Enabled (WM Bit = 0), No Idle Cycle ................................................................................ 746
Rev. 6.00 Jul. 15, 2009 Page xxix of xxxviii
Figure 25.14 Byte Control SRAM Timing: SW = 1 Cycle, HW = 1 Cycle, One Asynchronous External Wait Cycle, CSnWCR.BAS = 0 (UB-/LB-Controlled Write Cycle) ...... 747 Figure 25.15 Byte Control SRAM Timing: SW = 1 Cycle, HW = 1 Cycle, One Asynchronous External Wait Cycle, CSnWCR.BAS = 1 (WE-Controlled Write Cycle) ............. 748 Figure 25.16 Synchronous DRAM Single Read Bus Cycle (Auto-Precharge, CAS Latency = 2, WTRCD = 0 Cycle, WTRP = 0 Cycle)...... 749 Figure 25.17 Synchronous DRAM Single Read Bus Cycle (Auto-Precharge, CAS Latency = 2, WTRCD = 1 Cycle, WTRP = 1 Cycle)....... 750 Figure 25.18 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Auto-Precharge, CAS Latency = 2, WTRCD = 0 Cycle, WTRP = 1 Cycle)....... 751 Figure 25.19 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Auto-Precharge, CAS Latency = 2, WTRCD = 1 Cycle, WTRP = 0 Cycle)....... 752 Figure 25.20 Synchronous DRAM Single Write Bus Cycle (Auto-Precharge, TRWL = 1 Cycle) ..................................................................... 753 Figure 25.21 Synchronous DRAM Single Write Bus Cycle (Auto-Precharge, WTRCD = 2 Cycles, TRWL = 1 Cycle)................................... 754 Figure 25.22 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Auto-Precharge, WTRCD = 0 Cycle, TRWL = 1 Cycle) .................................... 755 Figure 25.23 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Auto-Precharge, WTRCD = 1 Cycle, TRWL = 1 Cycle) .................................... 756 Figure 25.24 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: ACT + READ Commands, CAS Latency = 2, WTRCD = 0 Cycle)..................... 757 Figure 25.25 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: READ Command, Same Row Address, CAS Latency = 2, WTRCD = 0 Cycle) .............................................................................................. 758 Figure 25.26 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: PRE + ACT + READ Commands, Different Row Addresses, CAS Latency = 2, WTRCD = 0 Cycle)................................................................. 759 Figure 25.27 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: ACT + WRITE Commands, WTRCD = 0 Cycle, TRWL = 0 Cycle).................................................................................................. 760 Figure 25.28 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: WRITE Command, Same Row Address, WTRCD = 0 Cycle, TRWL = 0 Cycle).................................................................................................. 761 Figure 25.29 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: PRE + ACT + WRITE Commands, Different Row Addresses, WTRCD = 0 Cycle, TRWL = 0 Cycle)................................................................. 762 Figure 25.30 Synchronous DRAM Auto-Refreshing Timing (WTRP = 1 Cycle, WTRC = 3 Cycles) ................................................................. 763 Figure 25.31 Synchronous DRAM Self-Refreshing Timing (WTRP = 1 Cycle) ....................... 764
Rev. 6.00 Jul. 15, 2009 Page xxx of xxxviii
Figure 25.32 Synchronous DRAM Mode Register Write Timing (WTRP = 1 Cycle)............... 765 Figure 25.33 PCMCIA Memory Card Interface Bus Timing ..................................................... 766 Figure 25.34 PCMCIA Memory Card Interface Bus Timing (TED = 2.5 Cycles, TEH = 1.5 Cycles, One Software Wait Cycle, One External Wait Cycle) ............ 767 Figure 25.35 PCMCIA I/O Card Interface Bus Timing.............................................................. 768 Figure 25.36 PCMCIA I/O Card Interface Bus Timing (TED = 2.5 Cycles, TEH = 1.5 Cycles, One Software Wait Cycle, One External Wait Cycle)........................................... 769 Figure 25.37 DREQ Input Timing.............................................................................................. 770 Figure 25.38 TENDn, DACKn Output Timing .......................................................................... 770 Figure 25.39 SCK Input Clock Timing....................................................................................... 771 Figure 25.40 SCI Input/Output Timing in Clocked Synchronous Mode .................................... 772 Figure 25.41 SIOMCLK Input Timing....................................................................................... 773 Figure 25.42 SIOF Transmit/Receive Timing (Master Mode 1/Falling Edge Sampling).......... 773 Figure 25.43 SIOF Transmit/Receive Timing (Master Mode 1/Rising Edge Sampling)........... 774 Figure 25.44 SIOF Transmit/Receive Timing (Master Mode 2/Falling Edge Sampling).......... 774 Figure 25.45 SIOF Transmit/Receive Timing (Master Mode 2/Rising Edge Sampling)........... 775 Figure 25.46 SIOF Transmit/Receive Timing (Slave Mode 1/ Slave Mode 2) ......................... 775 Figure 25.47 I/O Port Timing ..................................................................................................... 776 Figure 25.48 HIF Access Timing ............................................................................................... 778 Figure 25.49 HIFINT and HIFDREQ Timing ............................................................................ 778 Figure 25.50 HIFRDY and HIF Pin Enable/Disable Timing...................................................... 779 Figure 25.51 MII Transmission Timing (Normal Operation)..................................................... 781 Figure 25.52 MII Transmission Timing (Collision Occurred).................................................... 781 Figure 25.53 MII Reception Timing (Normal Operation) .......................................................... 782 Figure 25.54 MII Reception Timing (Error Occurred) ............................................................... 782 Figure 25.55 MDIO Input Timing .............................................................................................. 782 Figure 25.56 MDIO Output Timing ........................................................................................... 782 Figure 25.57 WOL Output Timing ............................................................................................. 783 Figure 25.58 EXOUT Output Timing......................................................................................... 783 Figure 25.59 TCK Input Timing................................................................................................. 784 Figure 25.60 TCK Input Timing in Reset Hold State ................................................................. 784 Figure 25.61 H-UDI Data Transmission Timing ........................................................................ 784 Figure 25.62 Output Load Circuit............................................................................................... 785 Appendix Figure C.1 Package Dimensions (BP-176) ................................................................................. 793
Rev. 6.00 Jul. 15, 2009 Page xxxi of xxxviii
Rev. 6.00 Jul. 15, 2009 Page xxxii of xxxviii
Tables
Section 1 Overview Table 1.1 Features of SH7619 .................................................................................................. 2 Table 1.2 Pin Functions ............................................................................................................ 9 Table 1.3 Pin Features ............................................................................................................ 17 Section 2 CPU Table 2.1 Initial Values of Registers....................................................................................... 27 Table 2.2 Word Data Sign Extension...................................................................................... 29 Table 2.3 Delayed Branch Instructions................................................................................... 30 Table 2.4 T Bit ........................................................................................................................ 30 Table 2.5 Access to Immediate Data ...................................................................................... 31 Table 2.6 Access to Absolute Address.................................................................................... 31 Table 2.7 Access with Displacement ...................................................................................... 32 Table 2.8 Addressing Modes and Effective Addresses........................................................... 32 Table 2.9 Instruction Formats ................................................................................................. 36 Table 2.10 Instruction Types .................................................................................................... 39 Section 3 Cache Table 3.1 LRU and Way to be Replaced ................................................................................ 54 Table 3.2 Correspondence between Divided Areas and Cache............................................... 55 Section 5 Exception Handling Table 5.1 Types of Exceptions and Priority............................................................................ 67 Table 5.2 Timing for Exception Detection and Start of Exception Handling ......................... 68 Table 5.3 Vector Numbers and Vector Table Address Offsets............................................... 69 Table 5.4 Calculating Exception Handling Vector Table Addresses ...................................... 70 Table 5.5 Reset Status............................................................................................................. 71 Table 5.6 Bus Cycles and Address Errors............................................................................... 73 Table 5.7 Interrupt Sources..................................................................................................... 74 Table 5.8 Interrupt Priority ..................................................................................................... 75 Table 5.9 Types of Exceptions Triggered by Instructions ...................................................... 76 Table 5.10 Delay Slot Instructions, Interrupt Disabled Instructions, and Exceptions............... 78 Table 5.11 Stack Status after Exception Handling Ends........................................................... 79 Section 6 Interrupt Controller (INTC) Table 6.1 Pin Configuration.................................................................................................... 85 Table 6.2 Interrupt Exception Handling Vectors and Priorities............................................ 100 Table 6.3 Interrupt Response Time....................................................................................... 105
Rev. 6.00 Jul. 15, 2009 Page xxxiii of xxxviii
Section 7 Bus State Controller (BSC) Table 7.1 Pin Configuration.................................................................................................. 110 Table 7.2 Address Map 1 (CMNCR.MAP = 0) .................................................................... 113 Table 7.3 Address Map 2 (CMNCR.MAP = 1) .................................................................... 113 Table 7.4 Correspondence between External Pin (MD3), Memory Type, and Bus Width for CS0 ................................................................ 114 Table 7.5 Correspondence between External Pin (MD5) and Endians................................. 114 Table 7.6 32-Bit External Device/Big Endian Access and Data Alignment......................... 143 Table 7.7 16-Bit External Device/Big Endian Access and Data Alignment......................... 144 Table 7.8 8-Bit External Device/Big Endian Access and Data Alignment........................... 145 Table 7.9 32-Bit External Device/Big Endian Access and Data Alignment......................... 146 Table 7.10 16-Bit External Device/Little Endian Access and Data Alignment ...................... 147 Table 7.11 8-Bit External Device/Little Endian Access and Data Alignment ........................ 148 Table 7.12 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (1) ................................................. 160 Table 7.13 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (2) ................................................. 161 Table 7.14 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (3) ................................................. 163 Table 7.15 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (4) ................................................. 164 Table 7.16 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (5) ................................................. 165 Table 7.17 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (6) ................................................. 167 Table 7.18 Relationship between Access Size and Number of Bursts.................................... 169 Table 7.19 Access Address for SDRAM Mode Register Write.............................................. 185 Section 8 Clock Pulse Generator (CPG) Table 8.1 Pin Configuration.................................................................................................. 204 Table 8.2 Mode Control Pins and Clock Operating Modes .................................................. 204 Table 8.3 Possible Combination of Clock Modes and FRQCR Values................................ 205 Section 10 Power-Down Modes Table 10.1 States of Power-Down Modes .............................................................................. 223 Table 10.2 Pin Configuration.................................................................................................. 224 Table 10.3 Register States in Software Standby Mode........................................................... 230 Section 11 Ethernet Controller (EtherC) Table 11.1 Pin Configuration.................................................................................................. 235
Rev. 6.00 Jul. 15, 2009 Page xxxiv of xxxviii
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC) Table 12.1 EESR Bits for which This Problem can Occur and Reflection of Interrupt Sources in the Descriptor ....................................................................... 307 Table 12.2 Reference Values for Maximum Specified Time.................................................. 323 Section 13 Direct Memory Access Controller (DMAC) Table 13.1 Pin Configuration.................................................................................................. 327 Table 13.2 Transfer Request Sources ..................................................................................... 340 Table 13.3 Selecting External Request Modes with RS Bits .................................................. 343 Table 13.4 Selecting External Request Detection with DL, DS Bits ...................................... 344 Table 13.5 Selecting External Request Detection with DO Bit .............................................. 344 Table 13.6 Selecting On-Chip Peripheral Module Request Modes with RS3 to RS0 Bits ..... 345 Table 13.7 Supported DMA Transfers.................................................................................... 348 Table 13.8 Relationship between Request Modes and Bus Modes by DMA Transfer Category ....................................................................................... 355 Section 15 Serial Communication Interface with FIFO (SCIF) Table 15.1 SCIF Pins .............................................................................................................. 380 Table 15.2 SCSMR Settings ................................................................................................... 399 Table 15.3 Bit Rates and SCBRR Settings in Asynchronous Mode ....................................... 399 Table 15.4 Bit Rates and SCBRR Settings in Synchronous Mode ......................................... 402 Table 15.5 Maximum Bit Rates for Various Frequencies with Baud Rate Generator (Asynchronous Mode)........................................................ 403 Table 15.6 Maximum Bit Rates with External Clock Input (Asynchronous Mode)............... 404 Table 15.7 Maximum Bit Rates with External Clock Input (Synchronous Mode) ................. 404 Table 15.8 SCSMR Settings and SCIF Communication Formats........................................... 415 Table 15.9 SCSMR and SCSCR Settings and SCIF Clock Source Selection......................... 415 Table 15.10 Serial Communication Formats (Asynchronous Mode).................................... 417 Table 15.11 SCIF Interrupt Sources ..................................................................................... 435 Section 16 Serial I/O with FIFO (SIOF) Table 16.1 Pin Configuration.................................................................................................. 447 Table 16.2 Operation in Each Transfer Mode......................................................................... 451 Table 16.3 SIOF Serial Clock Frequency ............................................................................... 477 Table 16.4 Serial Transfer Modes........................................................................................... 479 Table 16.5 Frame Length........................................................................................................ 480 Table 16.6 Audio Mode Specification for Transmit Data....................................................... 482 Table 16.7 Audio Mode Specification for Receive Data ........................................................ 482 Table 16.8 Setting Number of Channels in Control Data ....................................................... 483 Table 16.9 Conditions to Issue Transmit Request .................................................................. 485 Table 16.10 Conditions to Issue Receive Request ................................................................ 485
Rev. 6.00 Jul. 15, 2009 Page xxxv of xxxviii
Table 16.11 Table 16.12 Table 16.13
Transmit and Receive Reset ............................................................................. 493 SIOF Interrupt Sources ..................................................................................... 494 States of Transmit and Receive Operations in SPI Mode ................................. 503
Section 17 Host Interface (HIF) Table 17.1 Pin Configuration.................................................................................................. 513 Table 17.2 HIF Operations ..................................................................................................... 514 Table 17.3 Memory Map ........................................................................................................ 529 Table 17.4 Consecutive Write Procedure to HIFRAM by External DMAC........................... 536 Table 17.5 Consecutive Read Procedure from HIFRAM by External DMAC....................... 537 Table 17.6 HIFDATA Register Alignment for Access by an External Device ...................... 539 Table 17.7 HIF Registers (other than HIFDATA) Alignment for Access by an External Device....................................................... 539 Table 17.8 Input/Output Control for HIF Pins........................................................................ 541 Section 18 Pin Function Controller (PFC) Table 18.1 List of Multiplexed Pins (Port A) ......................................................................... 543 Table 18.2 List of Multiplexed Pins (Port B).......................................................................... 543 Table 18.3 List of Multiplexed Pins (Port C).......................................................................... 545 Table 18.4 List of Multiplexed Pins (Port D) ......................................................................... 546 Table 18.5 List of Multiplexed Pins (Port E).......................................................................... 546 Table 18.6 Pin Functions in Each Operating Mode ................................................................ 548 Table 18.7 Pins restricted in using in SH7619........................................................................ 577 Section 19 I/O Ports Table 19.1 Port A Data Register H (PADRH) Read/Write Operation.................................... 580 Table 19.2 Port B Data Register L (PBDRL) Read/Write Operation ..................................... 582 Table 19.3 Port C Data Registers H and L (PCDRH and PCDRL) Read/Write Operation .... 585 Table 19.4 Port D Data Register L (PDDRL) Read/Write Operation..................................... 587 Table 19.5 Port E Data Registers H, L (PEDRH, PEDRL) Read/Write Operation ................ 590 Section 20 User Break Controller (UBC) Table 20.1 Data Access Cycle Addresses and Operand Size Comparison Conditions........... 607 Section 21 User Debugging Interface (H-UDI) Table 21.1 Pin Configuration.................................................................................................. 616 Table 21.2 H-UDI Commands................................................................................................ 618 Table 21.3 External pins and Boundary Scan Register Bits ................................................... 619 Table 21.4 Reset Configuration .............................................................................................. 627 Section 22 Ethernet Physical Layer Transceiver (PHY) Table 22.1 Pin Configuration.................................................................................................. 633 Table 22.2 4B/5B Code Table ................................................................................................ 649
Rev. 6.00 Jul. 15, 2009 Page xxxvi of xxxviii
Section 25 Electrical Characteristics Table 25.1 Absolute Maximum Ratings ................................................................................. 729 Table 25.2 Recommended Timing at Power-On..................................................................... 730 Table 25.3 Recommended Timing in Power-Off.................................................................... 731 Table 25.4 DC Characteristics (1)........................................................................................... 732 Table 25.4 DC Characteristics (2)........................................................................................... 733 Table 25.5 Permissible Output Currents ................................................................................. 734 Table 25.6 Maximum Operating Frequency ........................................................................... 734 Table 25.7 Clock Timing ........................................................................................................ 735 Table 25.8 Control Signal Timing .......................................................................................... 739 Table 25.9 Bus Timing ........................................................................................................... 741 Table 25.10 DMAC Signal Timing....................................................................................... 770 Table 25.11 SCIF Timing ..................................................................................................... 771 Table 25.12 SCIF Timing ..................................................................................................... 772 Table 25.13 Port Timing ....................................................................................................... 776 Table 25.14 HIF Timing ....................................................................................................... 777 Table 25.15 EtherC Timing .................................................................................................. 780 Table 25.16 H-UDI Related Pin Timing............................................................................... 783 Table 25.17 PHY Characteristics.......................................................................................... 786 Appendix Table A.1 Port States in Each Pin State................................................................................. 787
Rev. 6.00 Jul. 15, 2009 Page xxxvii of xxxviii
Rev. 6.00 Jul. 15, 2009 Page xxxviii of xxxviii
Section 1 Overview
Section 1 Overview
This LSI is a CMOS single-chip microcontroller that integrates a Renesas Technology original RISC (Reduced Instruction Set Computer) CPU core with peripheral functions required for an Ethernet system. The CPU of this LSI has a RISC (Reduced Instruction Set Computer) type instruction set. The CPU basically operates at a rate of one instruction per cycle, offering a great improvement in instruction execution speed. In addition, the 32-bit internal architecture provides improved data processing power. With this CPU, it has become possible to assemble low-cost and highperformance/high-functionality systems even for applications such as realtime control, which could not previously be handled by microcontrollers because of their high-speed processing requirements. This LSI is equipped with an Ethernet controller that includes a media access controller (MAC) conforming to the IEEE802.3u standard and a physical layer transceiver (PHY), enabling 10/100 Mbps LAN connection. As the equipped Ethernet controller also includes a media independent interface (MII) standard unit, a PHY LSI can be externally connected. In addition, this LSI provides on-chip peripheral functions necessary for system configuration, such as cache memory, RAM, a direct memory access controller (DMAC), timers, a serial communication interface with FIFO (SCIF), a serial IO with FIFO (SIOF), a host interface (HFI), an interrupt controller (INTC), and I/O ports. The external memory access support function of this LSI enables direct connection to various types of memory, such as standard memory, SDRAM, and PCMCIA. This greatly reduces system cost.
Rev. 6.00 Jul. 15, 2009 Page 1 of 816 REJ09B0237-0600
Section 1 Overview
1.1
Features
The features of this LSI are listed in table 1.1. Table 1.1
Items CPU
Features of SH7619
Specification * * * * * * * Central processing unit with an internal 32-bit RISC (Reduced Instruction Set Computer) architecture Instruction length: 16-bit fixed length for improved code efficiency Load-store architecture (basic operations are executed between registers) Sixteen 32-bit general registers Five-stage pipeline On-chip multiplier: Multiplication operations (32 bits x 32 bits 64 bits) executed in two to five cycles C language-oriented 62 basic instructions Some specifications on the slot illegal instruction differ from the conventional SH2 core. For details, see section 5.8, Usage Notes in section 5, Exception Handling.
Note:
User break controller (UBC)
* * *
Address, data value, access type, and data size are available for setting as break conditions Supports the sequential break function Two break channels 16 kbytes Unified cache, mixture of instructions and data 4-way set associative type Selection of write-back or write-through mode 16 kbytes
U memory Cache memory
* * * * *
Rev. 6.00 Jul. 15, 2009 Page 2 of 816 REJ09B0237-0600
Section 1 Overview
Items Bus state controller (BSC)
Specification * Address space is divided into five areas: three areas 0, 3, and 4; each a maximum of 64 Mbytes, and two areas 5B and 6B; each a maximum of 32 Mbytes (address map 1 mode). Address space is divided into five areas, 0, 3, 4, 5, and 6; each a maximum of 64 Mbytes (address map 2 mode). 32-bit external bus (max.) The following features are settable for each area. Bus size (8, 16, or 32 bits) (Area 0 does not support the bus size of 32 bits.) Number of access wait cycles Setting of idle wait cycles Specifying the memory to be connected to each area enables direct connection to SRAM, SDRAM, and PCMCIA. Outputs chip select signals (CS0, CS3, CS4, CS5B, and CS6B) for corresponding area * * * * SDRAM refresh function Supports auto-refresh and self-refresh modes SDRAM burst access function PCMCIA access function Conforms to the JEIDA Ver. 4.2 standard, two slots Selection of big or little endian mode (The mode of all the areas is switched collectively by a mode pin.) Four channels; external request available for two of them Burst mode and cycle steal mode Outputs a transfer end signal of the channel handling an external request Intermittent mode available (16 and 64 cycles supported) Supports nine external interrupt pins (NMI, IRQ7 to IRQ0) On-chip peripheral interrupt: Priority level is independently selected for each module Vector address: Specified vector address for each interrupt source Supports the JTAG interface emulator JTAG standard pins arranged
* * *
Direct memory access * controller (DMAC) * * * Interrupt controller (INTC) * * * User debugging interface (H-UDI) * *
Rev. 6.00 Jul. 15, 2009 Page 3 of 816 REJ09B0237-0600
Section 1 Overview
Items
Specification Clock mode: Input clock can be selected from external input or crystal resonator Three types of clocks generated: CPU clock: 125 MHz (max.) Bus clock: 62.5 MHz (max.) Peripheral clock: 31.25 MHz (max.) * Supports power-down modes: Sleep mode Software standby mode * Selection of four types of clock modes (PLL2 x2/x4 and clock/crystal resonator are selectable) MAC (Media Access Control) function Data frame assembly/disassembly (frame format conforming to IEEE802.3) CSMA/CD link management (collision prevention and collision processing) CRC processing 512 bytes each for transmit/receive FIFO Full-duplex transmit/receive support Short frame/long frame detectable * Conforms to the MII (Media Independent Interface) standard Conversion from 8-bit stream data in MAC layer to MII nibble (4-bit) stream Station management (STA function) 18 TTL-level signals 10/100 Mbps transfer rate adjustable *
TM Magic Packet * (WOL (Wake-On-LAN) output)
Clock pulse generator * (CPG) *
Ethernet controller (EtherC)
*
Ethernet controller DMAC (EDMAC)
* * * * *
CPU load reduced with the descriptor management method For transferring from EtherC receive FIFO to receive buffer x 1 channel For transferring from transmit buffer to EtherC transmit FIFO x 1 channel 16-byte burst transfer improves the efficiency of system bus Supports single frame and multiple buffer
Rev. 6.00 Jul. 15, 2009 Page 4 of 816 REJ09B0237-0600
Section 1 Overview
Items
Specification Conforms to the IEEE802.3u standard. 10Base-T and 100Base-TX supported Supports Auto-negotiation and manual-negotiation modes Supports power-down modes Outputs the status of Link, Activity, Duplex, and Speed Selection of either on-chip clock oscillator output or dedicated clock externally input 1 kbyte x 2 banks: in total 2-kbyte buffer RAM The buffer RAM and the external device are connected in parallel via 16 data pins The buffer RAM and the CPU of this LSI are connected in parallel via internal bus The external device can access the desired register after the register index has been specified. (However, when the buffer RAM is accessed successively, the address is updated automatically.) Selection of endian mode Interrupt requested to the external device Internal interrupt requested to the CPU of this LSI Booting from the buffer RAM is enabled if the external device has stored the instruction code in the buffer RAM 16-bit counter Generates compare match interrupts Two channels Synchronous and asynchronous modes 16 bytes each for transmit/receive FIFO High-speed UART The UART supports FIFO stop and FIFO trigger Flow control enabled (channel 0 and channel 1 only) Three channels
Ethernet physical layer * transceiver (PHY) * * * * Host interface (HIF) * * * *
* * * * Compare match timer * (CMT) * * Serial communication interface with FIFO (SCIF) * * * * * *
Rev. 6.00 Jul. 15, 2009 Page 5 of 816 REJ09B0237-0600
Section 1 Overview
Items Serial IO with FIFO (SIOF)
Specification * * * * * 64 bytes each for transmit/receive FIFO Supports 8-/16-/16-bit stereo sound input/output Can operate together with the DMAC Supports frame synchronous signals One channel 78 general input/output pins Input or output can be set per bit within the input/output common port BP1313-176 (0.8 pitch) I/O: 3.0 to 3.6 V Internal: 1.80.09 V (Two power sources are externally provided.)
I/O ports Package Power supply voltage Note: *
* * * *
Magic PacketTM is the registered trademark of Advance Micro Devices, Inc.
Rev. 6.00 Jul. 15, 2009 Page 6 of 816 REJ09B0237-0600
Section 1 Overview
1.2
Block Diagram
Figure 1.1 is a block diagram of this LSI.
SuperH CPU core
User break controller (UBC) CPU bus (I clock)
Cache access controller (CCN) Internal bus (B clock)
Cache memory 16 kbytes
U memory 16 kbytes
Bus state controller (BSC)
Peripheral bus controller
Direct memory access controller (DMAC)
External bus
Direct memory access controller for Ethernet controller (E-DMAC)
Transmit FIFO (512 bytes) Receive FIFO (512 bytes)
Ethernet controller (EtherC)
Ethernet physical layer transceiver (PHY)
Peripheral bus (P clock)
I/O port, Pin function controller (PFC)
1-kbyte SRAM
Host interface (HIF)
Serial communication interface with FIFO (SCIF)*1
Serial IO with FIFO (SIOF)
Compare match timer (CMT)*2
User debugging interface (H-UDI)
Interrupt controller (INTC)
Powerdown mode control
Watchdog timer (WDT)
Clock pulse generator (CPG)
Notes: 1. SCIF includes three channels. 2. CMT includes two channels.
Figure 1.1 Block Diagram
Rev. 6.00 Jul. 15, 2009 Page 7 of 816 REJ09B0237-0600
Section 1 Overview
1.3
Pin Assignments
1 A
2
3
4
5
6
7
8
RD
9
10
11
12
13
14
15 A
VccQ
PA25
PA22
PA18
PA16
PB09
Vcc
VccQ
A13
A11
A07
A03
A01
PB12
B
VssQ
PD7
PA24
PA20
PA17
PB07
Vss
PB00
VssQ
A15
A09
A05
A02
VssQ
VccQ
B
C
PD4
PD5
PD6
PA21
PB08
PB10
PB06
PB11
PB13
A12
A08
A04
A00
PB04
PB02
C
D
PD0
PD2
PD3
PA23
PA19
PB01
PB05
CS0
A14
A10
A06
PB03
RD/(WR)
WE1/ DQMLU/ WE
WE0/ DQMLL
D
E
Vss
Vcc
PE08
PD1
Vss
Vcc
D09
D08
E
F
PE22
PE20
PE23
PE24
D13
D11
D10
D12
F
G
PE18
PE17
PE19
PE21
D06
D15
D14
D07
G
H
PE16
PE15
Vss
Vcc
BP1313-176 (Top view)
D03
D05
VccQ
VssQ
H
J
PE13
PE11
PE12
PE14
MD2
D01
D04
D02
J
K
VccQ
VssQ
PE09
PE10
Vcc
Vss
D00
CKIO
K
L
PE06
PE05
PE07
PE03
NMI
ASEMD
TESTMD
MD1
L
M
PE04
PE02
PE01
PC17
TSTBUSA
PC09
PC01
PC13
PC05
Vcc
MD5
TDI
TMS
TRST
RES
M
N
PE00
PC16
Vss1A
Vcc1A
EXRES1
PC08
PC03
PC11
PC07
Vss
PC19
TDO
MD0
Vss(PLL1) Vcc(PLL1)
N
P
PC15
PC18
Vss1A
Vcc2A
Vss2A
PC02
VssQ
PC04
PC12
PC20
CK_PHY
TCK
VccQ
VssQ
Vss(PLL2)
P
R
TxM
TxP
RxM
RxP
Vcc3A
PC00
VccQ
PC10
PC06
PC14
TESTOUT
MD3
EXTAL
XTAL
Vcc(PLL2)
R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Figure 1.2 Pin Assignments
Rev. 6.00 Jul. 15, 2009 Page 8 of 816 REJ09B0237-0600
Section 1 Overview
1.4
Table 1.2
Classification Power supply
Pin Functions
Pin Functions
Abbr. Vcc I/O Input Pin Name Description
Power Supply Power supply for the internal logic of this LSI. All the Vcc pins must be connected to the system power supply. This LSI does not operate correctly if there is a pin left open. Ground Ground pins. All the Vss pins must be connected to the system power supply (0 V). This LSI does not operate correctly if there is a pin left open.
Vss
Input
VccQ
Input
Power Supply Power supply for input/output pins. All the VccQ pins must be connected to the system power supply. This LSI does not operate correctly if there is a pin left open. Ground Ground pins. All the VssQ pins must be connected to the system power supply (0 V). This LSI does not operate correctly if there is a pin left open.
VssQ
Input
Clock
Vcc (PLL1) Vss (PLL1) Vcc (PLL2) Vss (PLL2) EXTAL
Input Input Input Input Input
Power Supply Power supply pin for the on-chip PLL1 oscillator for PLL1 Ground for PLL1 Ground pin for the on-chip PLL1 oscillator
Power Supply Power supply pin for the on-chip PLL2 oscillator for PLL2 Ground for PLL2 Ground pin for the on-chip PLL2 oscillator
External Clock Connects to a crystal resonator. An external clock is also input on this pin. For details on connection of an external clock, see section 8, Clock Pulse Generator (CPG). Connects to a crystal resonator.
XTAL CKIO
Output Crystal
Output System Clock Supplies the system clock to external devices. Mode Setting These pins set operating mode. The signal levels of these pins must not be changed during operation. Pins MD2 to MD0 are used for setting clock mode, pin MD3 is for setting bus width mode for area 0, and pin MD5 is for setting endian. Power-On Reset This LSI enters the power-on reset state when this signal goes low.
Input Operating MD5, MD3 to MD0 mode control
System control
RES
Input
Rev. 6.00 Jul. 15, 2009 Page 9 of 816 REJ09B0237-0600
Section 1 Overview
Classification Interrupt
Abbr. NMI IRQ7 to IRQ0
I/O Input Input
Pin Name
Description
Non-Maskable Non-maskable interrupt request pin. This pin must be fixed Interrupt high when not in use. Interrupt Maskable interrupt request pins. Request 7 to 0 Level-input or edge-input detection can be selected. When the edge-input detection is selected, the rising or falling edge can also be selected. These pins output addresses. 32-bit bidirectional bus
Address bus Data bus Bus control
A25 to A0 D31 to D0
Output Address Bus Input/ Data Bus output
CS0, CS3, Output Chip Select 0, Chip select signals for external memory and devices. 3, 4, 5B, 6B CS4, CS5B, CS6B RD RD/WR BS WE3 Output Read Output Read/Write Output Bus Cycle Start Output Most Significant Byte Write Output Second Byte Write Output Third Byte Write Output Least Significant Byte Write Input Wait Indicates that data is read from an external device. Read/write signal Indicates start of a bus cycle. Indicates that bits 31 to 24 of data of external memory or devices are written to. Indicates that bits 23 to 16 of data of external memory or devices are written to. Indicates that bits 15 to 8 of data of external memory or devices are written to. Indicates that bits 7 to 0 of data of external memory or devices are written to. Input pin used to insert wait cycles into the bus cycle when accessing the external space Connects to the RAS pin of SDRAM. Connects to the CAS pin of SDRAM. Connects to the CKE pin of SDRAM. Selects bits 31 to 24 of SDRAM data bus.
WE2 WE1 WE0
WAIT RAS CAS CKE DQMUU
Output RAS Output CAS Output Clock Enable Output Most Significant Byte Select
Rev. 6.00 Jul. 15, 2009 Page 10 of 816 REJ09B0237-0600
Section 1 Overview
Classification Bus control
Abbr. DQMUL DQMLU DQMLL
I/O
Pin Name
Description Selects bits 23 to 16 of SDRAM data bus. Selects bits 15 to 8 of SDRAM data bus. Selects bits 7 to 0 of SDRAM data bus.
Output Second Byte Select Output Third Byte Select Output Least Significant Byte Select
CE1A
Output PCMCIA Card Chip enable for PCMCIA allocated to area 5 Select Lower Side Output PCMCIA Card Chip enable for PCMCIA allocated to area 6 Select Lower Side Output PCMCIA Card Chip enable for PCMCIA allocated to area 5 Select Upper Side Output PCMCIA Card Chip enable for PCMCIA allocated to area 6 Select Upper Side Output PCMCIA I/O Write Strobe Output PCMCIA I/O Read Strobe Connects to the PCMCIA I/O write strobe pin. Connects to the PCMCIA I/O read strobe pin.
CE1B
CE2A
CE2B
ICIOWR ICIORD WE
Output PCMCIA Connects to the PCMCIA memory write strobe. Memory Write Strobe Input PCMCIA Dynamic Bus Sizing In little endian mode, this signal indicates 16-bit bus width of PCMCIA. In big endian mode, fix this pin low.
IOIS16
Ethernet controller
CRS COL
Input Input
Carrier Sense Carrier sense pin Collision Collision detect pin
MII_TXD3 to Output Transmit Data 4-bit transmit data pins MII_TXD0 TX_EN Output Transmit Enable Indicates that transmit data is on pins MII_TXD3 to MII_TXD0.
Rev. 6.00 Jul. 15, 2009 Page 11 of 816 REJ09B0237-0600
Section 1 Overview
Classification Ethernet controller
Abbr. TX_CLK TX_ER MII_RXD3 to MII_RXD0 RX_DV RX_CLK RX_ER MDC MDIO WOL
I/O Input
Pin Name Transmit Clock
Description Timing reference input for the TX_EN, TX_ER, and MII_TXD3 to MII_TXD0 pins
Output Transmit Error Informs PHY LSI of an error during transmission. Input Receive Data 4-bit receive data pins
Input Input Input
Receive Data Indicates that valid receive data is on pins MII_RXD3 to Valid MII_RXD0. Receive Clock Timing reference input for the RX_DV, RX_ER, and MII_RXD3 to MII_RXD0 pins Receive Error Pin for detection of an error during reception Timing reference input for transfer information on the MDIO pin Bidirectional pin for management information transfer Indicates that a Magic Packet* has received.
Output Management Clock Input/ Management output Data I/O Output MAGIC Packet Receive Input Link Status
LNKSTA EXOUT Direct memory access controller DREQ1, DREQ0 DACK1, DACK0 TEND1, TEND0 Serial communication interface with FIFO TXD2 to TXD0 RXD2 to RXD0 SCK2 to SCK0 RTS1 and RTS0
Input pin for a link state from a PHY LSI. Output pin to external devices Input pins for external DMA transfer request Request receive output pins for external DMA transfer request Output pins for DMA transfer end signal
Output General Output Input DMA transfer request
Output DMA transfer request receive Output DMA transfer end
Output Transmit Data Transmit data pins Input Receive Data Receive data pins Clock input pins Modem control pins. Supported only by SCIF0 and SCIF1.
Input/ Serial Clock output Output Transmit Request
Rev. 6.00 Jul. 15, 2009 Page 12 of 816 REJ09B0237-0600
Section 1 Overview
Classification
Abbr.
I/O Input
Pin Name Transmit Enable
Description Modem control pins. Supported only by SCIF0 and SCIF1.
CTS1 and Serial Communi- CTS0 cation interface with FIFO Serial I/O SIOMCLK0 with FIFO SCK_SIO0
Input
SIOF0 clock input
Master clock input pin Input/output pin for communication clock common to transmit/receive Input/output pin for frame synchronization signal common to transmit/receive Transmit data
Input/ SIOF0 output communication
clock
SIOFSYNC0
Input/ SIOF0 frame output sync Output SIOF0 transmit data Input
TXD_SIO0 RXD_SIO0 Host interface HIFD15 to HIFD00 HIFCS HIFRS HIFWR HIFRD HIFINT HIFMD HIFDREQ
SIOF0 receive Receive data data
Input/ HIF Data Bus Address, data, and command input/output pins for the HIF. output Input Input Input Input HIF Chip Select HIF Register Select HIF Write HIF Read Chip select input for the HIF. Controls the access type switching for the HIF. Write strobe signal Read strobe signal Interrupt request to external devices by the HIF. Specifies HIF boot mode. Requests DMAC transfer for the HIFRAM to external devices.
Output HIF Interrupt Input HIF Mode
Output HIF DMAC Transfer Request Output HIF Boot Ready Input HIF Pin Enable
HIFRDY HIFEBL
Indicates that a reset of the HIF has been cleared in this LSI and the HIF is ready for accesses to it. HIF pins other than this pin are enabled by driving this pin high.
Rev. 6.00 Jul. 15, 2009 Page 13 of 816 REJ09B0237-0600
Section 1 Overview
Classification
Abbr.
I/O Input Input Input
Pin Name Test Clock Test Mode Select Test Data Input
Description Test clock input pin Input pin for test mode select signal Serial input pin for an instruction and data Serial output pin for an instruction and data Input pin for initialization Pins for 10-bit general input/output port Pins for 14-bit general input/output port Pins for 21-bit general input/output port Pins for 8-bit general input/output port Pins for 25-bit general input/output port Specifies ASE mode. This LSI enters ASE mode when this signal goes low and normal mode when this pin goes high. In ASE mode, functions for the emulator are available.
TCK User debugging TMS interface (H-UDI) TDI TDO TRST I/O ports PA25 to PA16 PB13 to PB00 PC20 to PC00 PD07 to PD00 PE24 to PE00 Emulator interface ASEMD
Output Test Data Output Input Test Reset
Input/ General Port output Input/ General Port output Input/ General Port output Input/ General Port output Input/ General Port output Input ASE Mode
Test mode TESTMD
Input
Test Mode
Specifies test mode. This LSI enters test mode when this signal goes low. Fix this signal high.
TESTOUT Physical layer transceiver (PHY) Vcc1A
Output Test Output Input
Output pin for testing. This pin should be open.
Analog Power Analog power supply pin for the PHY Supply 1 for PHY Analog Power Analog power supply pin for the PHY Supply 2 for PHY
Vcc2A
Input
Rev. 6.00 Jul. 15, 2009 Page 14 of 816 REJ09B0237-0600
Section 1 Overview
Classification Physical layer transceiver (PHY)
Abbr. Vcc3A
I/O Input
Pin Name
Description
Analog Power Analog power supply pin for the PHY Supply 3 for PHY Analog Ground 1 for PHY Analog Ground 2 for PHY PHY Clock Analog ground pin for the PHY
Vss1A
Input
Vss2A
Input
Analog ground pin for the PHY
CK_PHY
Input
This pins is used to externally supply clocks to the PHY. When clocks are supplied to the on-chip PHY from the onchip clock pulse generator (CPG), this pins should be pulled up to VccQ or pulled down to VssQ.
TxP
Differential transmit output (+) for the Ethernet circuit by the Output Differential Transmit Data PHY. (+) Differential transmit output (-) for the Ethernet circuit by the Output Differential Transmit Data PHY. (-) Input Differential receive input (+) for the PHY by the Ethernet Differential Receive Data circuit. (+) Differential receive input (-) for the PHY by the Ethernet Differential Receive Data circuit. (-)
TxM
RxP
RxM
Input
Rev. 6.00 Jul. 15, 2009 Page 15 of 816 REJ09B0237-0600
Section 1 Overview
Classification Physical layer transceiver (PHY)
Abbr. SPEED100 LINK CRS DUPLEX EXRES1 TSTBUSA
I/O
Pin Name
Description Monitor output pins indicating communication status
Output SPEED100 signal Output LINK signal Output CRS signal Output DUPLEX signal Input Reference resistor
Connect to the PHY analog ground through a 12.4-k (accuracy: 1%) resistor. Input/output pin for testing the on-chip PHY. This pin should be open.
Input/ Test I/O output
Notes Fix all unused pins that have no weak keeper circuit to high or low level. Unused pins that internally have weak keeper circuit need not to be fixed to high or low level. The weak keeper is a circuit that is included in I/O pins and fixes the input pins to high or low when I/O pins are not driven from outside. * Magic Packet is the trademark of Advanced Micro Devices, Inc.
Rev. 6.00 Jul. 15, 2009 Page 16 of 816 REJ09B0237-0600
Section 1 Overview
Table 1.3
Pin No. A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15
Pin Features
Pin Name VccQ PA25/A25/SIOFSYNC0 PA22/A22/SIOMCLK0 PA18/A18 PA16/A16 PB09/CE2A Vcc RD VccQ A13 A11 A07 A03 A01 PB12/CS3 VssQ PD7/IRQ7/SCK2 PA24/A24/TXD_SIO0 PA20/A20 PA17/A17 PB07/CE2B Vss PB00/WAIT VssQ A15 A09 A05 A02 VssQ VccQ I/O Features Power IO/O/IO IO/O/I IO/O IO/O IO/O Power O Power O O O O O IO/O Power IO/I/IO IO/O/O IO/O IO/O IO/O Power IO/I Power O O O O Power Power
Rev. 6.00 Jul. 15, 2009 Page 17 of 816 REJ09B0237-0600
Section 1 Overview
Pin No. C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 E1 E2
Pin Name PD4/IRQ4/SCK1 PD5/IRQ5/TxD2/DREQ1 PD6/IRQ6/RxD2/DACK1 PA21/A21/SCK_SIO0 PB08/CS6B/CE1B PB10/CS5B/CE1A PB06/WE3 (BE3)/DQMUU/ICIOWR PB11/CS4 PB13/BS A12 A08 A04 A00 PB04/RAS PB02/CKE PD0/IRQ0/-/TEND0 PD2/IRQ2/TxD1/DREQ0 PD3/IRQ3/RxD1/DACK0 PA23/A23/RXD_SIO0 PA19/A19 PB01/IOIS16 PB05/WE2 (BE2)/DQMUL/ICIORD CS0 A14 A10 A06 PB03/CAS RD/WR WE1/DQMLU/WE WE0/DQMLL Vss Vcc
I/O Features IO/I/IO IO/I/O/I IO/I/I/O IO/O/IO IO/O/O IO/O/O IO/O/O/O IO/O IO/O O O O O IO/O IO/O IO/I/-/O IO/I/O/I IO/I/I/O IO/O/I IO/O IO/I IO/O/O/O O O O O IO/O O O/O/O O/O Power Power
Rev. 6.00 Jul. 15, 2009 Page 18 of 816 REJ09B0237-0600
Section 1 Overview
Pin No. E3 E4 E12 E13 E14 E15 F1 F2 F3 F4 F12 F13 F14 F15 G1 G2 G3 G4 G12 G13 G14 G15 H1 H2 H3 H4 H12 H13 H14 H15 J1 J2
Pin Name PE08/HIFCS PD1/IRQ1/-/TEND1 Vss Vcc D09 D08 PE22/HIFD13/CTS0/D29 PE20/HIFD11/SCK1/D27 PE23/HIFD14/RTS1/D30 PE24/HIFD15/CTS1/D31 D13 D11 D10 D12 PE18/HIFD09/TxD1/D25 PE17/HIFD08/SCK0/D24 PE19/HIFD10/RxD1/D26 PE21/HIFD12/RTS0/D28 D06 D15 D14 D07 PE16/HIFD07/RxD0/D23 PE15/HIFD06/TxD0/D22 Vss Vcc D03 D05 VccQ VssQ PE13/HIFD04/-/D20 PE11/HIFD02/-/D18
I/O Features IO/I IO/I/-/O Power Power IO IO IO/IO/I/IO IO/IO/IO/IO IO/IO/O/IO IO/IO/I/IO IO IO IO IO IO/IO/O/IO IO/IO/IO/IO IO/IO/I/IO IO/IO/O/IO IO IO IO IO IO/IO/I/IO IO/IO/O/IO Power Power IO IO Power Power IO/IO/-/IO IO/IO/-/IO
Rev. 6.00 Jul. 15, 2009 Page 19 of 816 REJ09B0237-0600
Section 1 Overview
Pin No. J3 J4 J12 J13 J14 J15 K1 K2 K3 K4 K12 K13 K14 K15 L1 L2 L3 L4 L12 L13 L14 L15 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10
Pin Name PE12/HIFD03/-/D19 PE14/HIFD05/-/D21 MD2 D01 D04 D02 VccQ VssQ PE09/HIFD00/-/D16 PE10/HIFD01/-/D17 Vcc Vss D00 CKIO PE06/HIFWR/SIOFSYNC0 PE05/HIFRD PE07/HIFRS PE03/HIFMD NMI ASEMD TESTMD MD1 PE04/HIFINT/TXD_SIO0 PE02/HIFDREQ/RXD_SIO0 PE01/HIFRDY/SIOMCLK0 PC17/MDC TSTBUSA PC09/RX_ER PC01/MII_RXD1 PC13/TX_CLK PC05/MII_TXD1/-/LINK Vcc
I/O Features IO/IO/-/IO IO/IO/-/IO I IO IO IO Power Power IO/IO/-/IO IO/IO/-/IO Power Power IO O IO/I/IO IO/I IO/I IO/I I I I I IO/O/O IO/O/I IO/O/I IO/O IO IO/I IO/I IO/I IO/O/-/O Power
Rev. 6.00 Jul. 15, 2009 Page 20 of 816 REJ09B0237-0600
Section 1 Overview
Pin No. M11 M12 M13 M14 M15 N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 N11 N12 N13 N14 N15 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12
Pin Name MD5 TDI TMS TRST RES PE00/HIFEBL/SCK_SIO0 PC16/MDIO Vss1A Vcc1A EXRES1 PC08/RX_DV PC03/MII_RXD3 PC11/TX_ER PC07/MII_TXD3/-/DUPLEX Vss PC19/EXOUT TDO MD0 Vss (PLL1) Vcc (PLL1) PC15/CRS PC18/LNKSTA Vss1A Vcc2A Vss2A PC02/MII_RXD2 VssQ PC04/MII_TXD0/-/SPEED100 PC12/TX_EN PC20/WOL CK_PHY TCK
I/O Features I I I I I IO/I/IO IO/IO Power Power I IO/I IO/I IO/O IO/O/-/O Power IO/O O I Power Power IO/I IO/I Power Power Power IO/I Power IO/O/-/O IO/O IO/O I I
Rev. 6.00 Jul. 15, 2009 Page 21 of 816 REJ09B0237-0600
Section 1 Overview
Pin No. P13 P14 P15 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15
Pin Name VccQ VssQ Vss (PLL2) TxM TxP RxM RxP Vcc3A PC00/MII_RXD0 VccQ PC10/RX_CLK PC06/MII_TXD2/-/CRS PC14/COL TESTOUT MD3 EXTAL XTAL Vcc (PLL2)
I/O Features Power Power Power O O I I Power IO/I Power IO/I IO/O/-/O IO/I O I I O Power
Rev. 6.00 Jul. 15, 2009 Page 22 of 816 REJ09B0237-0600
Section 2 CPU
Section 2 CPU
2.1 Features
* General registers: 32-bit register x 16 * Basic instructions: 62 * Addressing modes: 11 Register direct (Rn) Register indirect (@Rn) Post-increment register indirect (@Rn+) Pre-decrement register indirect (@-Rn) Register indirect with displacement (@disp:4, Rn) Index register indirect (@R0, Rn) GBR indirect with displacement (@disp:8, GBR) Index GBR indirect (@R0, GBR) PC relative with displacement (@disp:8, PC) PC relative (disp:8/disp:12/Rn) Immediate (#imm:8)
2.2
Register Configuration
There are three types of registers: general registers (32-bit x 16), control registers (32-bit x 3), and system registers (32-bit x 4).
Rev. 6.00 Jul. 15, 2009 Page 23 of 816 REJ09B0237-0600
Section 2 CPU
General register (Rn)
31 R0*1 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15, SP (hardware stack pointer)0*2 0
Status register (SR)
31 9 8765 43 210
M Q I3 I2 I1 I0 ST
Global base register (GBR)
31
GBR
0
Vector base register (VBR)
31
VBR
0
Multiply and accumulate register (MAC)
31
MACH MACL
0
Procedure register (PR)
31
PR
0
Program counter (PC)
31
PC
0
Notes: 1. R0 can be used as an index register in index register indirect or index GBR indirect addressing mode. For some instructions, only R0 is used as the source or destination register. 2. R15 is used as a hardware stack pointer during exception handling.
Figure 2.1 CPU Internal Register Configuration
Rev. 6.00 Jul. 15, 2009 Page 24 of 816 REJ09B0237-0600
Section 2 CPU
2.2.1
General Registers (Rn)
There are sixteen 32-bit general registers (Rn), designated R0 to R15. The general registers are used for data processing and address calculation. R0 is also used as an index register. With a number of instructions, R0 is the only register that can be used. R15 is used as a hardware stack pointer (SP). In exception handling, R15 is used for accessing the stack to save or restore the status register (SR) and program counter (PC) values. 2.2.2 Control Registers
There are three 32-bit control registers, designated status register (SR), global base register (GBR), and vector base register (VBR). SR indicates a processing state. GBR is used as a base address in GBR indirect addressing mode for data transfer of on-chip peripheral module registers. VBR is used as a base address of the exception handling (including interrupts) vector table. * Status register (SR)
Bit 31 to 10 Bit name Default All 0 Read/ Write R/W Description Reserved These bits are always read as 0. The write value should always be 0. 9 8 7 6 5 4 3, 2 M Q I3 I2 I1 I0 Undefined Undefined 1 1 1 1 All 0 R/W R/W R/W R/W R/W R/W R/W Reserved These bits are always read as 0. The write value should always be 0. 1 S Undefined R/W S Used by the multiply and accumulate instruction. Used by the DIV0U, DIV0S, and DIV1 instructions. Used by the DIV0U, DIV0S, and DIV1 instructions. Interrupt Mask
Rev. 6.00 Jul. 15, 2009 Page 25 of 816 REJ09B0237-0600
Section 2 CPU
Bit 0
Bit name T
Default Undefined
Read/ Write R/W
Description T Indicates true (1) or false (0) in the following instructions: MOVT, CMP/cond, TAS, TST, BT (BT/S), BF (BF/S), SETT, CLRT Indicates carry, borrow, overflow, or underflow in the following instructions: ADDV, ADDC, SUBV, SUBC, NEGC, DIV0U, DIV0S, DIV1, SHAR, SHAL, SHLR, SHLL, ROTR, ROTL, ROTCR, ROTCL
* Global-base register (GBR) This register indicates a base address in GBR indirect addressing mode. The GBR indirect addressing mode is used for data transfer of the on-chip peripheral module registers and logic operations. * Vector-base register (VBR) This register indicates the base address of the exception handling vector table. 2.2.3 System Registers
There are four 32-bit system registers, designated two multiply and accumulate registers (MACH and MACL), a procedure register (PR), and program counter (PC). * Multiply and accumulate registers (MAC) This register stores the results of multiplication and multiply-and-accumulate operation. * Procedure register (PR) This register stores the return-destination address from subroutine procedures. * Program counter (PC) The PC indicates the point which is four bytes (two instructions) after the current execution instruction.
Rev. 6.00 Jul. 15, 2009 Page 26 of 816 REJ09B0237-0600
Section 2 CPU
2.2.4
Initial Values of Registers
Table 2.1 lists the initial values of registers after a reset. Table 2.1 Initial Values of Registers
Register R0 to R14 R15 (SP) Control register SR Default Undefined SP value set in the exception handling vector table I3 to I0: 1111 (H'F) Reserved bits: 0 Other bits: Undefined GBR VBR System register MACH, MACL, PR PC Undefined H'00000000 Undefined PC value set in the exception handling vector table
Type of register General register
Rev. 6.00 Jul. 15, 2009 Page 27 of 816 REJ09B0237-0600
Section 2 CPU
2.3
2.3.1
Data Formats
Register Data Format
The size of register operands is always longwords (32 bits). When loading byte (8 bits) or word (16 bits) data in memory into a register, the data is sign-extended to longword and stored in the register.
31 Longword
0
Figure 2.2 Register Data Format 2.3.2 Memory Data Formats
Memory data formats are classified into byte, word, and longword. Byte data can be accessed from any address. If word data starting from boundary other than 2n or longword data starting from a boundary other than 4n is accessed, an address error will occur. In such cases, the data accessed cannot be guaranteed. See figure 2.3.
Address A + 1 Address A 31 Address A Address A + 4 Address A + 8 Byte 0 23 Byte 1 Address A + 3 31 Byte 3 Address A + 10 Address A + 11 0 Byte 3 23 Byte 2 Address A + 8
Address A + 2 15 Byte 2 7
Address A + 9 15 Byte 1 7 Byte 0 0 Address A + 8 Address A + 4 Address A
Word 0 Longword Big endian
Word 1
Word 1 Longword Little endian
Word 0
Figure 2.3 Memory Data Format Either big endian and little endian formats can be selected according to the mode pin setting at a reset. For details on mode pin settings, see section 7, Bus State Controller (BSC).
Rev. 6.00 Jul. 15, 2009 Page 28 of 816 REJ09B0237-0600
Section 2 CPU
2.3.3
Immediate Data Formats
Immediate data of eight bits is placed in the instruction code. For the MOV, ADD, and CMP/EQ instructions, the immediate data is sign-extended to longword and then calculated. For the TST, AND, OR, and XOR instructions, the immediate data is zeroextended to longword and then calculated. Thus, if the immediate data is used for the AND instruction, the upper 24 bits in the destination register are always cleared. The immediate data of word or longword is not placed in the instruction code. It is placed in a table in memory. The table in memory is accessed by the MOV immediate data instruction in PC relative addressing mode with displacement.
2.4
2.4.1
Features of Instructions
RISC Type
The instructions are RISC-type instructions with the following features: Fixed 16-Bit Length: All instructions have a fixed length of 16 bits. This improves program code efficiency. One Instruction per Cycle: Since pipelining is used, basic instructions can be executed in one cycle. One cycle is 25ns with 40 MHz operation. Data Size: The basic data size for operations is longword. Byte, word, or longword can be selected as the memory access size. Byte or word data in memory is sign-extended to longword and then calculated. Immediate data is sign-extended to longword for arithmetic operations or zero-extended to longword size for logical operations. Table 2.2 Word Data Sign Extension
Description Sign-extended to 32 bits, R1 becomes H'00001234, and is then operated on by the ADD instruction. Example of Other CPUs ADD.W #H'1234,R0
CPU in this LSI MOV.W ADD @(disp,PC),R1 R1,R0 ........ .DATA.W H'1234 Note: *
Immediate data is accessed by @(disp,PC).
Rev. 6.00 Jul. 15, 2009 Page 29 of 816 REJ09B0237-0600
Section 2 CPU
Load/Store Architecture: Basic operations are executed between registers. In operations involving memory, data is first loaded into a register (load/store architecture). However, bit manipulation instructions such as AND are executed directly in memory. Delayed Branching: Unconditional branch instructions mean the delayed branch instructions. With a delayed branch instruction, the branch is made after execution of the instruction immediately following the delayed branch instruction. This minimizes disruption of the pipeline when a branch is made. The conditional branch instructions have two types of instructions: conditional branch instructions and delayed branch instructions. Table 2.3 Delayed Branch Instructions
Description ADD is executed before branch to TRGET. Example of Other CPUs ADD.W R1,R0 BRA TRGET
CPU in this LSI BRA ADD TRGET R1,R0
Multiply/Multiply-and-Accumulate Operations: A 16 x 16 32 multiply operation is executed in one to two cycles, and a 16 x 16 + 64 64 multiply-and-accumulate operation in two to three cycles. A 32 x 32 64 multiply operation and a 32 x 32 + 64 64 multiply-andaccumulate operation are each executed in two to four cycles. T Bit: The result of a comparison is indicated by the T bit in SR, and a conditional branch is performed according to whether the result is True or False. Processing speed has been improved by keeping the number of instructions that modify the T bit to a minimum. Table 2.4 T Bit
Description When R0 R1, the T bit is set. Example of Other CPUs CMP.W R1,R0 TRGET0 TRGET1 TRGET
CPU in this LSI CMP/GE BT BF ADD CMP/EQ BT R1,R0 TRGET0 TRGET1 #-1,R0 #0,R0 TRGET
When R0 R1, a branch is made to TRGET0. BGE When R0 < R1, a branch is made to TRGET1. BLT The T bit is not changed by ADD. When R0 = 0, the T bit is set. A branch is made when R0 = 0. BEQ
SUB.W #1,R0
Rev. 6.00 Jul. 15, 2009 Page 30 of 816 REJ09B0237-0600
Section 2 CPU
Immediate Data: 8-bit immediate data is placed in the instruction code. Word and longword immediate data is not placed in the instruction code. It is placed in a table in memory. The table in memory is accessed with the MOV immediate data instruction using PC relative addressing mode with displacement. Table 2.5
Type 8-bit immediate 16-bit immediate
Access to Immediate Data
This LSI's CPU MOV #H'12,R0 ........ .DATA.W H'1234 Example of Other CPU MOV.B #H'12,R0
MOV.W @(disp,PC),R0
MOV.W #H'1234,R0
32-bit immediate
MOV.L
@(disp,PC),R0 ........
MOV.L #H'12345678,R 0
.DATA.L H'12345678 Note: * Immediate data is accessed by @(disp,PC).
Absolute Addresses: When data is accessed by absolute address, place the absolute address value in a table in memory beforehand. The absolute address value is transferred to a register using the method whereby immediate data is loaded when an instruction is executed, and the data is accessed using the register indirect addressing mode. Table 2.6
Type Absolute address
Access to Absolute Address
CPU in this LSI MOV.L MOV.B @(disp,PC),R1 @R1,R0 ........ .DATA.L H'12345678 Example of Other CPUs MOV.B @H'12345678,R0
Note:
*
Immediate data is referenced by @(disp,PC).
16-Bit/32-Bit Displacement: When data is accessed using the 16- or 32-bit displacement addressing mode, the displacement value is placed in a table in memory beforehand. Using the method whereby immediate data is loaded when an instruction is executed, this value is transferred to a register and the data is accessed using index register indirect addressing mode.
Rev. 6.00 Jul. 15, 2009 Page 31 of 816 REJ09B0237-0600
Section 2 CPU
Table 2.7
Type
Access with Displacement
CPU in this LSI MOV.W @(disp,PC),R0 MOV.W @(R0,R1),R2 ........ .DATA.W H'1234 Example of Other CPUs MOV.W @(H'1234,R1),R 2
16-bit displacement
Note:
*
Immediate data is referenced by @(disp,PC).
2.4.2
Addressing Modes
Table 2.8 lists addressing modes and effective address calculation methods. Table 2.8
Addressing Mode Register direct Register indirect
Addressing Modes and Effective Addresses
Instruction Format Effective Address Calculation Method Rn @Rn Effective address is register Rn. (Operand is register Rn contents.) Effective address is register Rn contents.
Rn Rn
Calculation Formula Rn Rn After instruction execution Byte: Rn + 1 Rn Word: Rn + 2 Rn Longword: Rn + 4 Rn
Register @Rn+ indirect with post-increment
Effective address is register Rn contents. A constant is added to Rn after instruction execution: 1 for a byte operand, 2 for a word operand, and 4 for a longword operand.
Rn Rn + 1/2/4 + 1/2/4 Rn
Register indirect with pre-decrement
@-Rn
Byte: Rn - 1 Rn Effective address is register Rn contents, decremented by a constant beforehand: 1 for a Word: Rn - 2 Rn byte operand, 2 for a word operand, 4 for a Longword: Rn - 4 longword operand. Rn
Rn Rn - 1/2/4
1/2/4
Rn - 1/2/4
(Instruction executed with Rn after calculation)
Rev. 6.00 Jul. 15, 2009 Page 32 of 816 REJ09B0237-0600
Section 2 CPU
Addressing Mode Register indirect with displacement
Instruction Format Effective Address Calculation Method @(disp:4, Rn) Effective address is register Rn contents with 4-bit displacement disp added. After disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size.
Rn disp (zero-extended) x 1/2/4
Calculation Formula Byte: Rn + disp Word: Rn + disp x 2 Longword: Rn + disp x 4
+
Rn + disp x 1/2/4
Index @(R0, Rn) Effective address is sum of register Rn and R0 register indirect contents.
Rn
Rn + R0
+
R0
Rn + R0
GBR indirect with displacement
@(disp:8, GBR)
Effective address is register GBR contents with 8-bit displacement disp added. After disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size.
GBR disp (zero-extended) x 1/2/4
Byte: GBR + disp Word: GBR + disp x2 Longword: GBR + disp x 4
+
GBR + disp x 1/2/4
Index GBR indirect
@(R0, GBR)
Effective address is sum of register GBR and R0 contents.
GBR
GBR + R0
+
R0
GBR + R0
Rev. 6.00 Jul. 15, 2009 Page 33 of 816 REJ09B0237-0600
Section 2 CPU
Addressing Mode
Instruction Format Effective Address Calculation Method Effective address is PC with 8-bit displacement disp added. After disp is zero-extended, it is multiplied by 2 (word) or 4 (longword), according to the operand size. With a longword operand, the lower 2 bits of PC are masked.
PC & H'FFFFFFFC disp (zero-extended) * PC + disp x 2 or PC& H'FFFFFFFC + disp x 4 *With longword operand
Calculation Formula Word: PC + disp x2 Longword: PC&H'FFFFFFFC + disp x 4
PC relative with @(disp:8, displacement PC)
+
x
2/4
PC relative
disp:8
Effective address is PC with 8-bit displacement PC + disp x 2 disp added after being sign-extended and multiplied by 2.
PC disp (sign-extended) x 2
+
PC + disp x 2
disp:12
Effective address is PC with 12-bit displacement disp added after being signextended and multiplied by 2.
PC disp (sign-extended) x 2
PC + disp x 2
+
PC + disp x 2
Rev. 6.00 Jul. 15, 2009 Page 34 of 816 REJ09B0237-0600
Section 2 CPU
Addressing Mode PC relative
Instruction Format Effective Address Calculation Method Rn Effective address is sum of PC and Rn.
PC
Calculation Formula PC + Rn
+
Rn
PC + Rn
Immediate
#imm:8 #imm:8 #imm:8
8-bit immediate data imm of TST, AND, OR, or XOR instruction is zero-extended. 8-bit immediate data imm of MOV, ADD, or CMP/EQ instruction is sign-extended.

8-bit immediate data imm of TRAPA instruction is zero-extended and multiplied by 4.
2.4.3
Instruction Formats
This section describes the instruction formats, and the meaning of the source and destination operands. The meaning of the operands depends on the instruction code. The following symbols are used in the table. xxxx: Instruction code mmmm: Source register nnnn: Destination register iiii: Immediate data dddd: Displacement
Rev. 6.00 Jul. 15, 2009 Page 35 of 816 REJ09B0237-0600
Section 2 CPU
Table 2.9
Instruction Formats
Source Operand Destination Operand Sample Instruction NOP
Instruction Format 0 type
15 0 xxxx xxxx xxxx xxxx
n type
15 0 xxxx nnnn xxxx xxxx
nnnn: register direct
MOVT Rn STS MACH,Rn
Control register or nnnn: register system register direct
Control register or nnnn: preSTC.L SR,@-Rn system register decrement register indirect m type
15 0 xxxx mmmm xxxx xxxx
mmmm: register direct
Control register or LDC Rm,SR system register
mmmm: postControl register or LDC.L @Rm+,SR increment register system register indirect mmmm: register indirect PC relative using Rm JMP @Rm BRAF Rm
Rev. 6.00 Jul. 15, 2009 Page 36 of 816 REJ09B0237-0600
Section 2 CPU
Instruction Format nm type
15 0 xxxx nnnn mmmm xxxx
Source Operand mmmm: register direct mmmm: register direct
Destination Operand nnnn: register direct nnnn: register indirect
Sample Instruction ADD Rm,Rn
MOV.L Rm,@Rn MAC.W @Rm+,@Rn+
mmmm: postMACH, MACL increment register indirect (multiplyand-accumulate operation) nnnn: * postincrement register indirect (multiplyand-accumulate operation) mmmm: postnnnn: register increment register direct indirect mmmm: register direct mmmm: register direct md type
15 0 xxxx xxxx mmmm dddd
MOV.L @Rm+,Rn
nnnn: preMOV.L Rm,@-Rn decrement register indirect nnnn: index register indirect MOV.L Rm,@(R0,Rn)
mmmmdddd: R0 (register direct) MOV.B @(disp,Rm),R0 register indirect with displacement R0 (register direct) nnnndddd: MOV.B R0,@(disp,Rn) register indirect with displacement mmmm: register direct nnnndddd: MOV.L Rm,@(disp,Rn) register indirect with displacement MOV.L @(disp,Rm),Rn
nd4 type
15 0 xxxx xxxx nnnn dddd
nmd type
15 0 xxxx nnnn mmmm dddd
mmmmdddd: nnnn: register register indirect direct with displacement
Rev. 6.00 Jul. 15, 2009 Page 37 of 816 REJ09B0237-0600
Section 2 CPU
Instruction Format d type
15 0 xxxx xxxx dddd dddd
Source Operand dddddddd: GBR indirect with displacement
Destination Operand
Sample Instruction
R0 (register direct) MOV.L @(disp,GBR),R0
R0 (register direct) dddddddd: GBR indirect with displacement dddddddd: PC relative with displacement d12 type
15 0 xxxx dddd dddd dddd
MOV.L R0,@(disp,GBR)
R0 (register direct) MOVA @(disp,PC),R0
dddddddd: PC relative dddddddddddd: PC relative nnnn: register direct
BF label BRA label (label=disp+PC) MOV.L @(disp,PC),Rn
nd8 type
15 0 xxxx nnnn dddd dddd
dddddddd: PC relative with displacement iiiiiiii: immediate iiiiiiii: immediate iiiiiiii: immediate
i type
15 0 xxxx xxxx iiii iiii
Index GBR indirect AND.B #imm,@(R0,GBR) R0 (register direct) AND #imm,R0 nnnn: register direct TRAPA #imm ADD #imm,Rn
ni type
15 0 xxxx nnnn iiii iiii
iiiiiiii: immediate
Note:
*
In multiply and accumulate instructions, nnnn is the source register.
Rev. 6.00 Jul. 15, 2009 Page 38 of 816 REJ09B0237-0600
Section 2 CPU
2.5
2.5.1
Instruction Set
Instruction Set by Type
Table 2.10 lists the instructions classified by type. Table 2.10 Instruction Types
Type Data transfer instructions Kinds of Instruction 5 Op Code MOV Function Data transfer Immediate data transfer Peripheral module data transfer Structure data transfer MOVA MOVT SWAP XTRCT Arithmetic operation instructions 21 ADD ADDC ADDV CMP/cond DIV1 DIV0S DIV0U DMULS DMULU DT EXTS EXTU MAC MUL Effective address transfer T bit transfer Upper/lower swap Extraction of middle of linked registers Binary addition Binary addition with carry Binary addition with overflow Comparison Division Signed division initialization Unsigned division initialization Signed double-precision multiplication Unsigned double-precision multiplication Decrement and test Sign extension Zero extension Multiply-and-accumulate, doubleprecision multiply-and-accumulate Double-precision multiplication 33 Number of Instructions 39
Rev. 6.00 Jul. 15, 2009 Page 39 of 816 REJ09B0237-0600
Section 2 CPU
Type Arithmetic operation instructions
Kinds of Instruction 21
Op Code MULS MULU NEG NEGC SUB SUBC SUBV
Function Signed multiplication Unsigned multiplication Sign inversion Sign inversion with borrow Binary subtraction Binary subtraction with carry Binary subtraction with underflow Logical AND Bit inversion Logical OR Memory test and bit setting T bit setting for logical AND Exclusive logical OR 1-bit left shift 1-bit right shift 1-bit left shift with T bit 1-bit right shift with T bit Arithmetic 1-bit left shift Arithmetic 1-bit right shift Logical 1-bit left shift Logical n-bit left shift Logical 1-bit right shift Logical n-bit right shift
Number of Instructions 33
Logic operation instructions
6
AND NOT OR TAS TST XOR
14
Shift instructions
10
ROTL ROTR ROTCL ROTCR SHAL SHAR SHLL SHLLn SHLR SHLRn
14
Rev. 6.00 Jul. 15, 2009 Page 40 of 816 REJ09B0237-0600
Section 2 CPU
Type Branch instructions
Kinds of Instruction 9
Op Code BF BT BRA BRAF BSR BSRF JMP JSR RTS
Function
Number of Instructions
Conditional branch, delayed conditional 11 branch (T = 0) Conditional branch, delayed conditional branch (T = 1) Unconditional branch Unconditional branch Branch to subroutine procedure Branch to subroutine procedure Unconditional branch Branch to subroutine procedure Return from subroutine procedure T bit clear MAC register clear Load into control register Load into system register No operation Return from exception handling T bit setting Transition to power-down mode Store from control register Store from system register Trap exception handling 142 31
System control instructions
11
CLRT CLRMAC LDC LDS NOP RTE SETT SLEEP STC STS TRAPA
Total:
62
Rev. 6.00 Jul. 15, 2009 Page 41 of 816 REJ09B0237-0600
Section 2 CPU
The instruction code, operation, and execution cycles of the instructions are listed in the following tables, classified by type.
Instruction Instruction Code Summary of Operation
Indicates summary of operation.
Execution Cycles T Bit
Value when no Value of T bit after wait cycles are instruction is executed 1 inserted* Explanation of Symbols : No change
Indicated by mnemonic. Indicated in MSB LSB order.
Explanation of Symbols Explanation of Symbols Explanation of Symbols OP.Sz SRC, DEST OP: Operation code Sz: Size SRC: Source DEST: Destination Rm: Source register Rn: Destination register imm: Immediate data disp: Displacement*
2
mmmm: Source register nnnn: Destination register 0000: R0 0001: R1 ......... 1111: R15 iiii: Immediate data
, : (xx):
Transfer direction Memory operand
M/Q/T: Flag bits in SR &: |: ^: Logical AND of each bit Logical OR of each bit Exclusive logical OR of each bit -: Logical NOT of each bit
dddd: Displacement
<>n: n-bit right shift
Notes: 1. The table shows the minimum number of execution states. In practice, the number of instruction execution states will be increased in cases such as the following: * When there is contention between an instruction fetch and a data access * When the destination register of a load instruction (memory register) is also used by the following instruction 2. Scaled (x1, x2, or x4) according to the instruction operand size, etc. For details, see SH-1/SH-2/SH-DSP Software Manual.
Rev. 6.00 Jul. 15, 2009 Page 42 of 816 REJ09B0237-0600
Section 2 CPU
* Data Transfer Instructions
Instruction MOV #imm,Rn Operation
imm Sign extension Rn extension Rn
Code
1110nnnniiiiiiii
Execution Cycles 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
T Bit
MOV.W @(disp,PC),Rn (disp x 2 + PC) Sign MOV.L @(disp,PC),Rn (disp x 4 + PC) Rn MOV Rm,Rn
Rm Rn Rm (Rn) Rm (Rn) Rm (Rn) (Rm) Sign extension Rn (Rm) Sign extension Rn (Rm) Rn Rn-1 Rn, Rm (Rn) Rn-2 Rn, Rm (Rn) Rn-4 Rn, Rm (Rn) (Rm) Sign extension Rn, Rm + 1 Rm (Rm) Sign extension Rn, Rm + 2 Rm
1001nnnndddddddd
1101nnnndddddddd 0110nnnnmmmm0011 0010nnnnmmmm0000 0010nnnnmmmm0001 0010nnnnmmmm0010 0110nnnnmmmm0000
MOV.B Rm,@Rn MOV.W Rm,@Rn MOV.L Rm,@Rn MOV.B @Rm,Rn MOV.W @Rm,Rn MOV.L @Rm,Rn MOV.B Rm,@-Rn MOV.W Rm,@-Rn MOV.L Rm,@-Rn MOV.B @Rm+,Rn MOV.W @Rm+,Rn MOV.L @Rm+,Rn
0110nnnnmmmm0001
0110nnnnmmmm0010 0010nnnnmmmm0100 0010nnnnmmmm0101 0010nnnnmmmm0110 0110nnnnmmmm0100
0110nnnnmmmm0101
(Rm) Rn,Rm + 4 Rm 0110nnnnmmmm0110 10000000nnnndddd 10000001nnnndddd 0001nnnnmmmmdddd 10000100mmmmdddd
MOV.B R0,@(disp,Rn) R0 (disp + Rn) MOV.W R0,@(disp,Rn) R0 (disp x 2 + Rn) MOV.L Rm,@(disp,Rn) Rm (disp x 4 + Rn) MOV.B @(disp,Rm),R0 (disp + Rm) Sign
extension R0
MOV.W @(disp,Rm),R0 (disp x 2 + Rm) Sign
extension R0
10000101mmmmdddd
MOV.L @(disp,Rm),Rn (disp x 4 + Rm) Rn MOV.B Rm,@(R0,Rn) MOV.W Rm,@(R0,Rn)
Rm (R0 + Rn) Rm (R0 + Rn)
0101nnnnmmmmdddd 0000nnnnmmmm0100 0000nnnnmmmm0101
Rev. 6.00 Jul. 15, 2009 Page 43 of 816 REJ09B0237-0600
Section 2 CPU
Instruction MOV.L Rm,@(R0,Rn) MOV.B @(R0,Rm),Rn MOV.W @(R0,Rm),Rn MOV.L @(R0,Rm),Rn
MOV.B MOV.W MOV.L MOV.B R0,@(disp,GBR) R0,@(disp,GBR) R0,@(disp,GBR) @(disp,GBR),R0
Operation
Rm (R0 + Rn) (R0 + Rm) Sign extension Rn (R0 + Rm) Sign extension Rn (R0 + Rm) Rn R0 (disp + GBR) R0 (disp x 2 + GBR) R0 (disp x 4 + GBR) (disp + GBR) Sign extension R0 (disp x 2 + GBR) Sign extension R0 (disp x 4 + GBR) R0
Code
0000nnnnmmmm0110 0000nnnnmmmm1100
Execution Cycles 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
T Bit
0000nnnnmmmm1101
0000nnnnmmmm1110 11000000dddddddd 11000001dddddddd 11000010dddddddd 11000100dddddddd
MOV.W
@(disp,GBR),R0
11000101dddddddd
MOV.L
@(disp,GBR),R0
11000110dddddddd 11000111dddddddd 0000nnnn00101001 0110nnnnmmmm1000
MOVA MOVT
@(disp,PC),R0 disp x 4 + PC R0 Rn
T Rn Rm Swap lowest two bytes Rn Rm Swap two consecutive words Rn Rm: Middle 32 bits of Rn Rn
SWAP.B Rm,Rn SWAP.W Rm,Rn XTRCT Rm,Rn
0110nnnnmmmm1001
0010nnnnmmmm1101
Rev. 6.00 Jul. 15, 2009 Page 44 of 816 REJ09B0237-0600
Section 2 CPU
* Arithmetic Operation Instructions
Instruction ADD ADD ADDC ADDV Rm,Rn #imm,Rn Rm,Rn Rm,Rn Operation
Rn + Rm Rn Rn + imm Rn Rn + Rm + T Rn, Carry T Rn + Rm Rn, Overflow T If R0 = imm, 1 T If Rn = Rm, 1 T If Rn Rm with unsigned data, 1 T If Rn Rm with signed data, 1 T If Rn > Rm with unsigned data, 1 T If Rn > Rm with signed data, 1 T If Rn 0, 1 T If Rn > 0, 1 T If Rn and Rm have an equivalent byte, 1 T Single-step division (Rn/Rm) MSB of Rn Q, MSB of Rm M, M^ Q T 0 M/Q/T
Code
0011nnnnmmmm1100 0111nnnniiiiiiii 0011nnnnmmmm1110
Execution Cycles 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 to 5*
T Bit
Carry Overflow Comparison result Comparison result Comparison result Comparison result Comparison result Comparison result Comparison result Comparison result Comparison result Calculation result Calculation result
0011nnnnmmmm1111
CMP/EQ #imm,R0 CMP/EQ Rm,Rn CMP/HS Rm,Rn CMP/GE Rm,Rn CMP/HI Rm,Rn CMP/GT Rm,Rn CMP/PZ Rn CMP/PL Rn CMP/STRRm,Rn DIV1 DIV0S DIV0U DMULS.L Rm,Rn Rm,Rn
10001000iiiiiiii
0011nnnnmmmm0000
0011nnnnmmmm0010
0011nnnnmmmm0011
0011nnnnmmmm0110
0011nnnnmmmm0111
0100nnnn00010001
0100nnnn00010101
0010nnnnmmmm1100
0011nnnnmmmm0100
0010nnnnmmmm0111
0000000000011001 0011nnnnmmmm1101
0
Rm,Rn Signed operation of
Rn x Rm MACH, MACL 32 x 32 64 bits
Rev. 6.00 Jul. 15, 2009 Page 45 of 816 REJ09B0237-0600
Section 2 CPU
Instruction DMULU.L
Operation Rm,Rn Unsigned operation of
Rn x Rm MACH, MACL 32 x 32 64 bits
Code
0011nnnnmmmm0101
Execution Cycles T Bit 2 to 5*
DT
Rn
Rn - 1 Rn, if Rn = 0, 1 T, else 0 T A byte in Rm is signextended Rn A word in Rm is signextended Rn A byte in Rm is zeroextended Rn A word in Rm is zeroextended Rn Signed operation of (Rn) x (Rm) + MAC MAC, 32 x 32 + 64 64 bits Signed operation of (Rn) x (Rm) + MAC MAC, 16 x 16 + 64 64 bits Rn x Rm MACL 32 x 32 32 bits Signed operation of Rn x Rm MAC 16 x 16 32 bits Unsigned operation of Rn x Rm MAC 16 x 16 32 bits 0-Rm Rn 0-Rm-T Rn, Borrow T Rn-Rm Rn Rn-Rm-T Rn, Borrow T
0100nnnn00010000
1 1 1 1 1 2 to 5*
Comparison result
EXTS.B Rm,Rn EXTS.W Rm,Rn EXTU.B Rm,Rn EXTU.W Rm,Rn MAC.L @Rm+,@Rn+
0110nnnnmmmm1110

0110nnnnmmmm1111
0110nnnnmmmm1100
0110nnnnmmmm1101
0000nnnnmmmm1111
MAC.W @Rm+,@Rn+
0100nnnnmmmm1111
2 to 4*
MUL.L Rm,Rn MULS.W Rm,Rn
0000nnnnmmmm0111
2 to 5* 1 (3)*

0010nnnnmmmm1111
MULU.W Rm,Rn
0010nnnnmmmm1110
1 (3)*
NEG
Rm,Rn
0110nnnnmmmm1011 0110nnnnmmmm1010
1 1 1 1
Borrow Borrow
NEGC Rm,Rn
SUB
Rm,Rn
0011nnnnmmmm1000 0011nnnnmmmm1010
SUBC Rm,Rn
Rev. 6.00 Jul. 15, 2009 Page 46 of 816 REJ09B0237-0600
Section 2 CPU
Instruction
Operation
Rn-Rm Rn, Underflow T
Code
0011nnnnmmmm1011
Execution Cycles T Bit 1 Overflow
SUBV Rm,Rn
Note: *
Indicates the number of execution cycles for normal operation. The values in parentheses indicate the number of execution cycles when conflicts occur with the previous or next instruction.
* Logic Operation Instructions
Instruction AND AND Rm,Rn #imm,R0 Operation
Rn & Rm Rn R0 & imm R0 (R0 + GBR)
Code
Execution Cycles
T Bit
Test result Test result Test result Test result
0010nnnnmmmm1001 1 11001001iiiiiiii 1 11001101iiiiiiii 3 0110nnnnmmmm0111 1 0010nnnnmmmm1011 1 11001011iiiiiiii 1 11001111iiiiiiii 3 0100nnnn00011011 4 0010nnnnmmmm1000 1 11001000iiiiiiii 1 11001100iiiiiiii 3 0010nnnnmmmm1010 1 11001010iiiiiiii 1 11001110iiiiiiii 3
AND.B #imm,@(R0,GBR) (R0 + GBR) & imm NOT OR OR Rm,Rn Rm,Rn #imm,R0
~Rm Rn Rn | Rm Rn R0 | imm R0 (R0 + GBR)
OR.B #imm,@(R0,GBR) (R0 + GBR) | imm TAS.B @Rn TST TST Rm,Rn #imm,R0
If (Rn) is 0, 1 T; 1 MSB of (Rn) Rn & Rm; if the result is 0, 1 T R0 & imm; if the result is 0, 1 T if the result is 0, 1 T
TST.B #imm,@(R0,GBR) (R0 + GBR) & imm; XOR XOR Rm,Rn #imm,R0
Rn ^ Rm Rn R0 ^ imm R0 (R0 + GBR)

XOR.B #imm,@(R0,GBR) (R0 + GBR) ^ imm
Rev. 6.00 Jul. 15, 2009 Page 47 of 816 REJ09B0237-0600
Section 2 CPU
* Shift Instructions
Instruction ROTL ROTR ROTCL ROTCR SHAL SHAR SHLL SHLR SHLL2 SHLR2 SHLL8 SHLR8 Rn Rn Rn Rn Rn Rn Rn Rn Rn Rn Rn Rn Operation
T Rn MSB LSB Rn T T Rn T T Rn T T Rn 0 MSB Rn T T Rn 0 0 Rn T Rn << 2 Rn Rn >> 2 Rn Rn << 8 Rn Rn >> 8 Rn Rn << 16 Rn Rn >> 16 Rn
Code
Execution Cycles
T Bit MSB LSB MSB LSB MSB LSB MSB LSB
0100nnnn00000100 1 0100nnnn00000101 1 0100nnnn00100100 1 0100nnnn00100101 1 0100nnnn00100000 1 0100nnnn00100001 1 0100nnnn00000000 1 0100nnnn00000001 1 0100nnnn00001000 1 0100nnnn00001001 1 0100nnnn00011000 1 0100nnnn00011001 1 0100nnnn00101000 1 0100nnnn00101001 1
SHLL16 Rn SHLR16 Rn
* Branch Instructions
Instruction BF label Operation
If T = 0, disp x 2 + PC PC; if T = 1, nop Delayed branch, if T = 0, disp x 2 + PC PC; if T = 1, nop If T = 1, disp x 2 + PC PC; if T = 0, nop Delayed branch, if T = 1, disp x 2 + PC PC; if T = 0, nop
Code
Execution Cycles
T Bit
10001011dddddddd 3/1*
BF/S label
10001111dddddddd 2/1*
BT
label
10001001dddddddd 3/1*
BT/S label
10001101dddddddd 2/1*
Rev. 6.00 Jul. 15, 2009 Page 48 of 816 REJ09B0237-0600
Section 2 CPU
Instruction BRA label
Operation
Delayed branch, disp x 2 + PC PC Delayed branch, Rm + PC PC
Code
Execution Cycles
T Bit
1010dddddddddddd 2 0000mmmm00100011 2
BRAF Rm BSR label
Delayed branch, PC PR, 1011dddddddddddd 2 disp x 2 + PC PC Delayed branch, PC PR, 0000mmmm00000011 2 Rm + PC PC Delayed branch, Rm PC 0100mmmm00101011 2
BSRF Rm JMP JSR RTS Note: * @Rm @Rm
Delayed branch, PC PR, 0100mmmm00001011 2 Rm PC Delayed branch, PR PC 0000000000001011 2
One cycle when the branch is not executed.
* System Control Instructions
Instruction CLRT CLRMAC LDC LDC LDC Rm,SR Rm,GBR Rm,VBR Operation 0T 0 MACH, MACL Rm SR Rm GBR Rm VBR
(Rm) SR, Rm + 4 Rm (Rm) GBR, Rm + 4 Rm
Code
0000000000001000 0000000000101000 0100mmmm00001110 0100mmmm00011110 0100mmmm00101110 0100mmmm00000111 0100mmmm00010111
Execution Cycles 1 1 6 4 4 8 4 4 1 1 1 1 1
T Bit
0 LSB LSB
LDC.L @Rm+,SR LDC.L @Rm+,GBR LDC.L @Rm+,VBR LDS LDS LDS Rm,MACH Rm,MACL Rm,PR
(Rm) VBR, Rm + 4 Rm 0100mmmm00100111 Rm MACH Rm MACL Rm PR (Rm) MACH, Rm + 4 Rm (Rm) MACL, Rm + 4 Rm 0100mmmm00001010 0100mmmm00011010 0100mmmm00101010 0100mmmm00000110
LDS.L @Rm+,MACH LDS.L @Rm+,MACL
0100mmmm00010110
Rev. 6.00 Jul. 15, 2009 Page 49 of 816 REJ09B0237-0600
Section 2 CPU
Instruction LDS.L @Rm+,PR NOP RTE SETT SLEEP STC STC STC SR,Rn GBR,Rn VBR,Rn
Operation
(Rm) PR, Rm + 4 Rm No operation Delayed branch, Stack area PC/SR 1T Sleep SR Rn GBR Rn VBR Rn Rn-4 Rn, SR (Rn) Rn-4 Rn, GBR (Rn) Rn-4 Rn, VBR (Rn) MACH Rn MACL Rn PR Rn Rn-4 Rn, MACH (Rn) Rn-4 Rn, MACL (Rn) Rn-4 Rn, PR (Rn) PC/SR Stack area, (imm x 4 + VBR) PC
Code
0100mmmm00100110 0000000000001001 0000000000101011
Execution Cycles 1 1 5 1 4* 1 1 1 1 1 1 1 1 1 1 1 1 8
T Bit
1
0000000000011000 0000000000011011 0000nnnn00000010 0000nnnn00010010 0000nnnn00100010 0100nnnn00000011 0100nnnn00010011 0100nnnn00100011 0000nnnn00001010 0000nnnn00011010 0000nnnn00101010 0100nnnn00000010 0100nnnn00010010 0100nnnn00100010 11000011iiiiiiii
STC.L SR,@-Rn STC.L GBR,@-Rn STC.L VBR,@-Rn STS STS STS MACH,Rn MACL,Rn PR,Rn
STS.L MACH,@-Rn STS.L MACL,@-Rn STS.L PR,@-Rn TRAPA #imm Note: *
Number of execution cycles until this LSI enters sleep mode. About the number of execution cycles: The table lists the minimum number of execution cycles. In practice, the number of execution cycles will be increased depending on the conditions such as: * When there is a conflict between instruction fetch and data access * When the destination register of a load instruction (memory register) is also used by the instruction immediately after the load instruction.
Rev. 6.00 Jul. 15, 2009 Page 50 of 816 REJ09B0237-0600
Section 2 CPU
2.6
2.6.1
Processing States
State Transition
The CPU has the four processing states: reset, exception handling, program execution, and powerdown. Figure 2.4 shows the CPU state transition. Note that some products do not support the manual reset function and the MRES pin.
RES = 0 in any state RES = 1 and MRES = 0 in any state
Power-on reset state
Manual reset state
Reset state
Exception handling state Request for internal power-on reset Request for NMI or internal manual reset by the WDT or IRQ interrupt Request for End of exception handling exception handling Program execution state SLEEP instruction by clearing SSBY bit SLEEP instruction by setting SSBY bit
Sleep mode
Software standby mode
Power-down mode
Figure 2.4 CPU State Transition
Rev. 6.00 Jul. 15, 2009 Page 51 of 816 REJ09B0237-0600
Section 2 CPU
* Reset state The CPU is reset. When the RES pin is driven low, the CPU enters the power-on reset state. When the RES pin is high and MRES pin is low, the CPU enters the manual reset state. * Exception handling state This state is a transitional state in which the CPU processing state changes due to a request for exception handling such as a reset or an interrupt. When a reset occurs, the execution start address as the initial value of the program counter (PC) and the initial value of the stack pointer (SP) are fetched from the exception handling vector table. Then, a branch is made for the start address to execute a program. When an interrupt occurs, the PC and status register (SR) are saved in the stack area pointed to by SP. The start address of an exception handling routine is fetched from the exception handling vector table and a branch to the address is made to execute a program. Then the processing state enters the program execution state. * Program execution state The CPU executes programs sequentially. * Power-down state The CPU stops to reduce power consumption. The SLEEP instruction makes the CPU enter sleep mode or software standby mode.
Rev. 6.00 Jul. 15, 2009 Page 52 of 816 REJ09B0237-0600
Section 3 Cache
Section 3 Cache
3.1
* * * * * *
Features
Capacity: 16 kbytes Structure: Instructions/data unified, 4-way set associative Line size: 16 bytes Number of entries: 256 entries/way in 16-kbyte mode Write method: Write-back/write-through is selectable Replacement method: Least-recently-used (LRU) algorithm Cache Structure
3.1.1
The cache holds both instructions and data and employs a 4-way set associative system. It is composed of four ways (banks), and each of which is divided into an address section and a data section. Each of the address and data sections is divided into 256 entries. The data of an entry is called a line. Each line consists of 16 bytes (4 bytes x 4). The data capacity per way is 4 kbytes (16 bytes x 256 entries), with a total of 16 kbytes in the cache (4 ways). Figure 3.1 shows the cache structure.
Address array (ways 0 to 3) Data array (ways 0 to 3) LRU
Entry 0 V U Tag address Entry 1 . . . . . .
0 1 . . . . . .
LW0
LW1
LW2
LW3
0 1 . . . . . .
Entry 255 24 (1 + 1 + 22) bits
255 128 (32 x 4) bits LW0 to LW3: Longword data 0 to 3
255 6 bits
Figure 3.1 Cache Structure
Rev. 6.00 Jul. 15, 2009 Page 53 of 816 REJ09B0237-0600
Section 3 Cache
Address Array: The V bit indicates whether or not the entry data is valid. When the V bit is 1, data is valid; when 0, data is not valid. The U bit indicates whether or not the entry has been written to in write-back mode. When the U bit is 1, the entry has been written to; when 0, it has not. The tag address is composed of 22 bits (address bits 31 to 10) used for comparison during cache searches. In this LSI, the upper three bits of 32 address bits are used as shadow bits (see section 7, Bus State Controller (BSC)), therefore, the upper three bits of the tag address are cleared to 0. The V and U bits are initialized to 0 by a power-on reset. The tag address is not initialized by a power-on reset. Data Array: Holds 16-byte instruction and data. Entries are registered in the cache in line units (16 bytes). The data array is not initialized by a power-on reset. LRU: With the 4-way set associative system, up to four instructions or data with the same entry address can be registered in the cache. When an entry is registered, LRU shows which of the four ways it is registered in. There are six LRU bits, controlled by hardware. The least-recently-used (LRU) algorithm is used to select the way. When a cache miss occurs, six LRU bits indicate the way to be replaced. If a bit pattern other than those listed in table 3.1 is set in the LRU bits by software, the cache will not function correctly. When changing the LRU bits by software, set one of the patterns listed in table 3.1. The LRU bits are initialized to 000000 by a power-on reset. Table 3.1 LRU and Way to be Replaced
Way to be Replaced 3 2 1 0
LRU (Bits 5 to 0) 000000, 000100, 010100, 100000, 110000, 110100 000001, 000011, 001011, 100001, 101001, 101011 000110, 000111, 001111, 010110, 011110, 011111 111000, 111001, 111011, 111100, 111110, 111111
Rev. 6.00 Jul. 15, 2009 Page 54 of 816 REJ09B0237-0600
Section 3 Cache
3.1.2
Divided Areas and Cache
A 4-G byte address space is divided into five areas with the architecture of this LSI. The cache access methods can be specified for each area. Table 3.2 lists the correspondence between the divided areas and cache. Table 3.2
Address H'00000000 to H'7FFFFFFF H'80000000 to H'9FFFFFFF H'A0000000 to H'BFFFFFFF H'C0000000 to H'DFFFFFFF H'E0000000 to H'FFFFFFFF
Correspondence between Divided Areas and Cache
Area P0 P1 P2 P3 P4 Cacheable Cacheable Cacheable Non cacheable Cacheable Non cacheable (internal I/O) Cache Operating Control WT bit in CCR1 CB bit in CCR1 WT bit in CCR1
Rev. 6.00 Jul. 15, 2009 Page 55 of 816 REJ09B0237-0600
Section 3 Cache
3.2
Register Descriptions
The cache has the following registers. For details on register addresses and register states during each process, refer to section 24, List of Registers. * Cache control register 1 (CCR1) 3.2.1 Cache Control Register 1 (CCR1)
The cache is enabled or disabled by the CE bit in CCR1. CCR1 also has the CF bit (which invalidates all cache entries), and the WT and CB bits (which select either write-through mode or write-back mode). Programs that change the contents of CCR1 should be placed in the address space that is not cached.
Bit 31 to 4 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 3 CF 0 R/W Cache Flush Writing 1 flushes all cache entries meaning that it clears the V, U, and LRU bits of all cache entries to 0. This bit is always read as 0. Write-back to external memory is not performed when the cache is flushed. 2 CB 0 R/W Write-Back Indicates the cache operating mode for H'80000000 to H'9FFFFFFF. 0: Write-through mode 1: Write-back mode 1 WT 0 R/W Write-Through Indicates the cache operating mode for H'00000000 to H'7FFFFFFF and H'C0000000 to H'DFFFFFFF. 0: Write-back mode 1: Write-through mode
Rev. 6.00 Jul. 15, 2009 Page 56 of 816 REJ09B0237-0600
Section 3 Cache
Bit 0
Bit Name CE
Initial Value 0
R/W R/W
Description Cache Enable Indicates whether or not the cache function is used. 0: Cache function is not used. 1: Cache function is used.
3.3
3.3.1
Operation
Searching Cache
If the cache is enabled (the CE bit in CCR1 is set to 1), whenever an instruction or data in H'00000000 to H'7FFFFFFF, H'8000000 to H'9FFFFFFF, and H'C0000000 to H'DFFFFFFF is accessed, the cache will be searched to see if the desired instruction or data is in the cache. Figure 3.2 illustrates the method by which the cache is searched. Entries are selected using bits 11 to 4 of the memory access address and the tag address of that entry is read. The address comparison is performed on all four ways. When the comparison shows a match and the selected entry is valid (V = 1), a cache hit occurs. When the comparison does not show a match or the selected entry is not valid (V = 0), a cache miss occurs. Figure 3.2 shows a hit on way 1.
Rev. 6.00 Jul. 15, 2009 Page 57 of 816 REJ09B0237-0600
Section 3 Cache
Address
31 12 11 4 3 2 10
Entry selection
Longword (LW) selection Ways 0 to 3 Ways 0 to 3
0 1
V U Tag address
LW0
LW1
LW2
LW3
255
CMP0 CMP1 CMP2 CMP3
Hit signal 1 CMP0: Comparison circuit 0 CMP1: Comparison circuit 1 CMP2: Comparison circuit 2 CMP3: Comparison circuit 3
Figure 3.2 Cache Search Scheme 3.3.2 Read Access
Read Hit: In a read access, instructions and data are transferred from the cache to the CPU. The LRU bits are updated so that they point to the most recently hit way. Read Miss: An external bus cycle starts and the entry is updated. The way to be replaced is shown in table 3.1. Data is updated in units of 16 bytes by updating the entry. When the desired instruction or data is loaded from external memory to the cache, the instruction or data is transferred to the CPU in parallel. When it is loaded to the cache, the U bit is cleared to 0, the V bit is set to 1, the LRU bits are updated so that they point to the most recently hit way. When the U bit of the entry which is to be replaced by entry updating in write-back mode is 1, the cacheupdate cycle starts after the entry is transferred to the write-back buffer. After the cache completes its update cycle, the write-back buffer writes the entry back to the memory. Transfer is in 16-byte units.
Rev. 6.00 Jul. 15, 2009 Page 58 of 816 REJ09B0237-0600
Section 3 Cache
3.3.3
Write Access
Write Hit: In a write access in write-back mode, the data is written to the cache and no external memory write cycle is generated. The U bit of the entry that has been written to is set to 1, and the LRU bits are updated to indicate that the hit way is the most recently hit way. In write-through mode, the data is written to the cache and an external memory write cycle is generated. The U bit of the entry that has been written to is not updated, and the LRU bits are updated to indicate that the hit way is the most recently hit way. Write Miss: In write-back mode, an external write cycle starts when a write miss occurs, and the entry is updated. The way to be replaced is shown in table 3.1. When the U bit of the entry which is to be replaced by entry updating is 1, the cache-update cycle starts after the entry has been transferred to the write-back buffer. Data is written to the cache and the U bit and the V bit are set to 1. The LRU bits are updated to indicate that the replaced way is the most recently updated way. After the cache has completed its update cycle, the write-back buffer writes the entry back to the memory. Transfer is in 16-byte units. In write-through mode, no write to cache occurs in a write miss; the write is only to the external memory. 3.3.4 Write-Back Buffer
When the U bit of the entry to be replaced in write-back mode is 1, the entry must be written back to the external memory. To increase performance, the entry to be replaced is first transferred to the write-back buffer and fetching of new entries to the cache takes priority over writing back to the external memory. After the fetching of new entries to the cache completes, the write-back buffer writes the entry back to the external memory. During the write-back cycles, the cache can be accessed. The write-back buffer can hold one line of cache data (16 bytes) and its physical address. Figure 3.3 shows the configuration of the write-back buffer.
PA (31 to 4) Longword 0 Longword 1 Longword 2 Longword 3 PA (31 to 4): Physical address to be written to external memory Longword 0 to 3: One line of cache data to be written to external memory
Figure 3.3 Write-Back Buffer Configuration 3.3.5 Coherency of Cache and External Memory
Coherency between the cache and the external memory must be ensured by software. When memory shared by this LSI and another device is allocated to a cacheable address space, invalidate and write back the cache by accessing the memory-mapped cache, as required. Memory that is shared by the CPU, DMAC, and E-DMAC of this LSI should also be handled in this way.
Rev. 6.00 Jul. 15, 2009 Page 59 of 816 REJ09B0237-0600
Section 3 Cache
3.4
Memory-Mapped Cache
To allow software management of the cache, cache contents can be read from or written to by the MOV instructions. The address array is allocated to addresses H'F0000000 to H'F0FFFFFF, and the data array to addresses H'F1000000 to H'F1FFFFFF. The address array and data array must be accessed in longwords, and instruction fetches cannot be performed. 3.4.1 Address Array
The address array is allocated to H'F0000000 to H'F0FFFFFF. To access an address array, the 32bit address field (for read/write accesses) and 32-bit data field (for write accesses) must be specified. The address field specifies information for selecting the entry to be accessed; the data field specifies the tag address, V bit, U bit, and LRU bits to be written to the address array. In the address field, specify the entry address for selecting the entry, W for selecting the way, A for enabling or disabling the associative operation, and H'F0 for indicating address array access. As for W, 00 indicates way 0, 01 indicates way 1, 10 indicates way 2, and 11 indicates way 3. In the data field, specify the tag address, LRU bits, U bit, and V bit. Always clear the upper three bits (bits 31 to 29) of the tag address to 0. Figure 3.4 shows the address and data formats. The following three operations are available in the address array. Address-Array Read: Read the tag address, LRU bits, U bit, and V bit for the entry that corresponds to the entry address and way specified by the address field of the read instruction. In reading, the associative operation is not performed, regardless of whether the associative bit (A bit) specified in the address is 1 or 0. Address-Array Write (Non-Associative Operation): Write the tag address, LRU bits, U bit, and V bit, specified by the data field of the write instruction, to the entry that corresponds to the entry address and way as specified by the address field of the write instruction. Ensure that the associative bit (A bit) in the address field is set to 0. When writing to a cache line for which the U bit = 1 and the V bit =1, write the contents of the cache line back to memory, then write the tag address, LRU bits, U bit, and V bit specified by the data field of the write instruction. When 0 is written to the V bit, 0 must also be written to the U bit for that entry.
Rev. 6.00 Jul. 15, 2009 Page 60 of 816 REJ09B0237-0600
Section 3 Cache
Address-Array Write (Associative Operation): When writing with the associative bit (A bit) of the address field set to 1, the addresses in the four ways for the entry specified by the address field of the write instruction are compared with the tag address that is specified by the data field of the write instruction. Write the U bit and the V bit specified by the data field of the write instruction to the entry of the way that has a hit. However, the tag address and LRU bits remain unchanged. When there is no way that has a hit, nothing is written and there is no operation. This function is used to invalidate a specific entry in the cache. When the U bit of the entry that has had a hit is 1 at this time, writing back should be performed. However, when 0 is written to the V bit, 0 must also be written to the U bit of that entry. 3.4.2 Data Array
The data array is allocated to H'F1000000 to H'F1FFFFFF. To access a data array, the 32-bit address field (for read/write accesses) and 32-bit data field (for write accesses) must be specified. The address field specifies information for selecting the entry to be accessed; the data field specifies the longword data to be written to the data array. In the address field, specify the entry address for selecting the entry, L for indicating the longword position within the (16-byte) line, W for selecting the way, and H'F1 for indicating data array access. As for L, 00 indicates longword 0, 01 indicates longword 1, 10 indicates longword 2, and 11 indicates longword 3. As for W, 00 indicates way 0, 01 indicates way 1, 10 indicates way 2, and 11 indicates way 3. Since access size of the data array is fixed at longword, bits 1 and 0 of the address field should be set to 00. Figure 3.4 shows the address and data formats. The following two operations on the data array are available. The information in the address array is not affected by these operations. Data-Array Read: Read the data specified by L of the address field, from the entry that corresponds to the entry address and the way that is specified by the address field. Data-Array Write: Write the longword data specified by the data field, to the position specified by L of the address field, in the entry that corresponds to the entry address and the way specified by the address field.
Rev. 6.00 Jul. 15, 2009 Page 61 of 816 REJ09B0237-0600
Section 3 Cache
(1) Address array access (a) Address specification Read access 31 1111 0000 Write access 31 1111 0000
24 23 *--------*
14 13 12 11 W Entry address
43210 0*00
24 23 *--------*
14 13 12 11 W Entry address
43210 A*00
(b) Data specification (both read and write accesses) 31 30 29 28 00 0 Tag address (28 to 10) 10 9 LRU 43210 X XU V
(2) Data array access (both read and write accesses) (a) Address specification 31 1111 0001 (b) Data specification 31 Longword [Legend] *: Don't care X: 0 for read, don't care for write 0 24 23 *--------* 14 13 12 11 W Entry address 43210 L 00
Figure 3.4 Specifying Address and Data for Memory-Mapped Cache Access
Rev. 6.00 Jul. 15, 2009 Page 62 of 816 REJ09B0237-0600
Section 3 Cache
3.4.3
Usage Examples
Invalidating Specific Entries: Specific cache entries can be invalidated by writing 0 to the entry's V bit in the memory-mapped cache access. When the A bit is 1, the tag address specified by the write data is compared to the tag address within the cache selected by the entry address, and the V bit and U bit specified by the write data are written when a match is found. If no match is found, there is no operation. When the V bit of an entry in the address array is set to 0, the entry is written back if the entry's U bit is 1. In the example shown below, R0 specifies the write data and R1 specifies the address.
; R0=H'01100010; VPN=B'0000 0001 0001 0000 0000 00, U=0, V=0 ; R1=H'F0000088; address array access, entry=B'00001000, A=1 ; MOV.L R0,@R1
Reading Data of Specific Entry: The data section of a specific entry can be read from by the memory-mapped cache access. The longword indicated in the data field of the data array in figure 3.4 is read into the register. In the example shown below, R0 specifies the address and R1 shows what is read.
; R0=H'F100004C; data array access, entry=B'00000100 ; Way = 0, longword address = 3 ; MOV.L @R0,R1 ; Longword 3 is read.
Rev. 6.00 Jul. 15, 2009 Page 63 of 816 REJ09B0237-0600
Section 3 Cache
Rev. 6.00 Jul. 15, 2009 Page 64 of 816 REJ09B0237-0600
Section 4 U Memory
Section 4 U Memory
This LSI has on-chip U memory which can be used to store instructions and data.
4.1
Features
Features of the U Memory are shown below. * Size 16 kbytes * Address H'E55F_C000 to H'E55F_FFFF * Priority The U memory can be accessed from the I bus by the DMAC and E-DMAC and from the L bus by the CPU. In the event of simultaneous accesses from different buses, the accesses are processed according to the priority. The priority is: I bus > L bus.
4.2
Usage Notes
In sleep mode, the U memory cannot be accessed by the DMAC and E-DMAC.
Rev. 6.00 Jul. 15, 2009 Page 65 of 816 REJ09B0237-0600
Section 4 U Memory
Rev. 6.00 Jul. 15, 2009 Page 66 of 816 REJ09B0237-0600
Section 5 Exception Handling
Section 5 Exception Handling
5.1
5.1.1
Overview
Types of Exception Handling and Priority
Exception handling is started by four sources: resets, address errors, interrupts and instructions and have the priority, as shown in table 5.1. When several exceptions are detected at once, they are processed according to the priority. Table 5.1
Exception Reset
Types of Exceptions and Priority
Exception Source Power-on reset H-UDI reset Priority High
Interrupt Address error Instruction
User break (break before instruction execution) CPU address error (instruction fetch) General illegal instructions (undefined code) Illegal slot instruction (undefined code placed immediately after a delayed branch instruction*1 or instruction that changes the PC value*2) Trap instruction (TRAPA instruction)
Address error Interrupt
CPU address error (data access) User break (break after instruction execution or operand break) NMI H-UDI IRQ On-chip peripheral modules Watchdog timer (WDT) Ether controller (EtherC and E-DMAC) Compare match timer 0 and 1 (CMT0 and CMT1) Serial communication interface with FIFO (SCIF0, SCIF1, and SCIF2) Host interface (HIF) Low
Rev. 6.00 Jul. 15, 2009 Page 67 of 816 REJ09B0237-0600
Section 5 Exception Handling
Exception Interrupt
Exception Source On-chip peripheral modules Direct memory access controller (DMAC0, DMAC1 DMAC2, and DMAC3) Serial I/O with FIFO (SIOF)
Priority High Low
Notes: 1. Delayed branch instructions: JMP, JSR, BRA, BSR, RTS, RTE, BF/S, BT/S, BSRF, and BRAF. 2. Instructions that change the PC value: JMP, JSR, BRA, BSR, RTS, RTE, BT, BF, TRAPA, BF/S, BT/S, BSRF, BRAF, LDC Rm,SR, LDC.L @Rm+,SR.
5.1.2
Exception Handling Operations
The exceptions are detected and the exception handling starts according to the timing shown in table 5.2. Table 5.2
Exception Reset Power-on reset H-UDI reset Address error Interrupt Instruction
Timing for Exception Detection and Start of Exception Handling
Timing of Source Detection and Start of Exception Handling Started when the RES pin changes from low to high or when the WDT overflows. Started when the reset assert command and the reset negate command are input to the H-UDI in this order. Detected during the instruction decode stage and started after the execution of the current instruction is completed. Trap instruction Started by the execution of the TRAPA instruction. General illegal instructions Illegal slot instructions Started when an undefined code placed at other than a delay slot (immediately after a delayed branch instruction) is decoded. Started when an undefined code placed at a delay slot (immediately after a delayed branch instruction) or an instruction that changes the PC value is detected.
When exception handling starts, the CPU operates Exception Handling Triggered by Reset: The initial values of the program counter (PC) and stack pointer (SP) are fetched from the exception handling vector table (PC from the address H'A0000000 and SP from the address H'A0000004). For details, see section 5.1.3, Exception Handling Vector Table. H'00000000 is then written to the vector base register (VBR), and H'F (B'1111) is written to the interrupt mask bits (I3 to I0) in the status register (SR). The program starts from the PC address fetched from the exception handling vector table.
Rev. 6.00 Jul. 15, 2009 Page 68 of 816 REJ09B0237-0600
Section 5 Exception Handling
Exception Handling Triggered by Address Error, Interrupt, and Instruction: SR and PC are saved to the stack indicated by R15. For interrupt exception handling, the interrupt priority level is written to the interrupt mask bits (I3 to I0) in SR. For address error and instruction exception handling, bits I3 to I0 are not affected. The start address is then fetched from the exception handling vector table and the program starts from that address. 5.1.3 Exception Handling Vector Table
Before exception handling starts, the exception handling vector table must be set in memory. The exception handling vector table stores the start addresses of exception handling routines. (The reset exception handling table holds the initial values of PC and SP.) All exception sources are given different vector numbers and vector table address offsets. The vector table addresses are calculated from these vector numbers and vector table address offsets. During exception handling, the start addresses of the exception handling routines are fetched from the exception handling vector table that is indicated by this vector table address. Table 5.3 shows the vector numbers and vector table address offsets. Table 5.4 shows how vector table addresses are calculated. Table 5.3 Vector Numbers and Vector Table Address Offsets
Vector Number 0 1 2 3 General illegal instruction (Reserved by system) Illegal slot instruction (Reserved by system) 4 5 6 7 8 CPU address error (Reserved by system) Interrupt NMI User break H-UDI 9 10 11 12 13 Vector Table Address Offset H'00000000 to H'00000003 H'00000004 to H'00000007 H'00000008 to H'0000000B H'0000000C to H'0000000F H'00000010 to H'00000013 H'00000014 to H'00000017 H'00000018 to H'0000001B H'0000001C to H'0000001F H'00000020 to H'00000023 H'00000024 to H'00000027 H'00000028 to H'0000002B H'0000002C to H'0000002F H'00000030 to H'00000033 H'00000034 to H'00000037
Exception Handling Source Power-on reset H-UDI reset (Reserved by system) PC SP
Rev. 6.00 Jul. 15, 2009 Page 69 of 816 REJ09B0237-0600
Section 5 Exception Handling
Exception Handling Source (Reserved by system)
Vector Number 14 : 31
Vector Table Address Offset H'00000038 to H'0000003B : H'0000007C to H'0000007F H'00000080 to H'00000083 : H'000000FC to H'000000FF H'00000100 to H'00000103 H'00000104 to H'00000107 H'00000108 to H'0000010B H'0000010C to H'0000010F H'00000110 to H'00000113 : H'0000013C to H'0000013F H'00000140 to H'00000143 H'00000144 to H'00000147 H'00000148 to H'0000014B H'0000014C to H'0000014F H'00000120 to H'00000124 : H'000003FC to H'000003FF
Trap instruction (user vector)
32 : 63
Interrupt
IRQ0 IRQ1 IRQ2 IRQ3 (Reserved by system)
64 65 66 67 68 : 79
IRQ4 IRQ5 IRQ6 IRQ7 On-chip peripheral module*
80 81 82 83 84 : 255
Note:
*
For details on the vector numbers and vector table address offsets of on-chip peripheral module interrupts, see table 6.2, Interrupt Exception Handling Vectors and Priorities in section 6, Interrupt Controller (INTC).
Table 5.4
Calculating Exception Handling Vector Table Addresses
Vector Table Address Calculation Vector table address = H'A0000000 + (vector table address offset) = H'A0000000 + (vector number) x 4 Vector table address = VBR + (vector table address offset) = VBR + (vector number) x 4
Exception Source Resets Address errors, interrupts, instructions
Notes: 1. VBR: Vector base register 2. Vector table address offset: See table 5.3. 3. Vector number: See table 5.3.
Rev. 6.00 Jul. 15, 2009 Page 70 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.2
5.2.1
Resets
Types of Resets
Resets have priority over any exception source. As table 5.5 shows, a power-on reset initializes all modules in this LSI. Table 5.5 Reset Status
Conditions for Transition to Reset State WDT Overflow Overflow Not overflowed H-UDI Command Internal State On-Chip Peripheral Module Initialized Initialized Initialized
Type Power-on reset
RES Low High
CPU, INTC Initialized Initialized
PFC, I/O Port Initialized Initialized Initialized
H-UDI reset
High
Reset assert Initialized command
5.2.2
Power-On Reset
Power-On Reset by RES Pin: When the RES pin is driven low, this LSI enters the power-on reset state. To reliably reset this LSI, the RES pin should be kept low for at least the oscillation settling time when applying the power or when in standby mode (when the clock is halted) or at least 20 tcyc when the clock is operating. During the power-on reset state, CPU internal states and all registers of on-chip peripheral modules are initialized. In the power-on reset state, power-on reset exception handling starts when driving the RES pin high after driving the pin low for the given time. The CPU operates as follows: 1. The initial value (execution start address) of the program counter (PC) is fetched from the exception handling vector table. 2. The initial value of the stack pointer (SP) is fetched from the exception handling vector table. 3. The vector base register (VBR) is cleared to H'00000000 and the interrupt mask bits (I3 to I0) of the status register (SR) are set to H'F (B'1111). 4. The values fetched from the exception handling vector table are set in PC and SP, then the program starts. Be certain to always perform power-on reset exception handling when turning the system power on.
Rev. 6.00 Jul. 15, 2009 Page 71 of 816 REJ09B0237-0600
Section 5 Exception Handling
Power-On Reset by WDT: When TCNT of the WDT overflows while a setting is made so that a power-on reset can be generated in watchdog timer mode of the WDT, this LSI enters the poweron reset state. If a reset caused by the signal input on the RES pin and a reset caused by a WDT overflow occur simultaneously, the RES pin reset has priority, and the WOVF bit in RSTCSR is cleared to 0. When the power-on reset exception handling caused by the WDT is started, the CPU operates as follows: 1. The initial value (execution start address) of the program counter (PC) is fetched from the exception handling vector table. 2. The initial value of the stack pointer (SP) is fetched from the exception handling vector table. 3. The vector base register (VBR) is cleared to H'00000000 and the interrupt mask bits (I3 to I0) of the status register (SR) are set to H'F (B'1111). 4. The values fetched from the exception handling vector table are set in the PC and SP, then the program starts. 5.2.3 H-UDI Reset
The H-UDI reset is generated by issuing the H-UDI reset assert command. The CPU operation is described below. For details, see section 21, User Debugging Interface (H-UDI). 1. The initial value (execution start address) of the program counter (PC) is fetched from the exception handling vector table. 2. The initial value of the stack pointer (SP) is fetched from the exception handling vector table. 3. The vector base register (VBR) is cleared to H'00000000 and the interrupt mask bits (I3 to I0) in the status register (SR) are set to H'F (B'1111). 4. The values fetched from the exception handling vector table are set in PC and SP, then the program starts.
Rev. 6.00 Jul. 15, 2009 Page 72 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.3
5.3.1
Address Errors
Address Error Sources
Address errors occur when instructions are fetched or data is read from or written to, as shown in table 5.6. Table 5.6 Bus Cycles and Address Errors
Bus Cycle Type Instruction fetch Data read/write Bus Master CPU Bus Cycle Description Instruction fetched from even address Instruction fetched from odd address CPU Word data accessed from even address Word data accessed from odd address Longword data accessed from a longword boundary Longword data accessed from other than a long-word boundary Address Errors None (normal) Address error occurs None (normal) Address error occurs None (normal) Address error occurs
5.3.2
Address Error Exception Source
When an address error exception is generated, the bus cycle which caused the address error ends, the current instruction finishes, and then the address error exception handling starts. The CPU operates as follows: 1. The status register (SR) is saved to the stack. 2. The program counter (PC) is saved to the stack. The PC value to be saved is the start address of the instruction which caused an address error exception. When the instruction that caused the exception is placed in the delay slot, the address of the delayed branch instruction which is placed immediately before the delay slot. 3. The start address of the exception handling routine is fetched from the exception handling vector table that corresponds to the generated address error, and the program starts executing from that address. This branch is not a delayed branch.
Rev. 6.00 Jul. 15, 2009 Page 73 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.4
5.4.1
Interrupts
Interrupt Sources
Table 5.7 shows the sources that start the interrupt exception handling. They are NMI, user break, H-UDI, IRQ, and on-chip peripheral modules. Table 5.7
Type NMI User break H-UDI IRQ On-chip peripheral module
Interrupt Sources
Request Source NMI pin (external input) User break controller (UBC) User debug interface (H-UDI) IRQ0 to IRQ7 pins (external input) Watchdog timer (WDT) Ether controller (EtherC and E-DMAC) Compare match timer (CMT0 and CMT1) Serial communication interface with FIFO (SCIF0, SCIF1, and SCIF2) Host interface (HIF) Direct memory access controller (DMAC0, DMAC1, DMAC2, and DMAC3) Serial I/O with FIFO (SIOF) Number of Sources 1 1 1 8 1 1 2 12 2 4 1
All interrupt sources are given different vector numbers and vector table address offsets. For details on vector numbers and vector table address offsets, see table 6.2, Interrupt Exception Handling Vectors and Priorities in section 6, Interrupt Controller (INTC).
Rev. 6.00 Jul. 15, 2009 Page 74 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.4.2
Interrupt Priority
The interrupt priority is predetermined. When multiple interrupts occur simultaneously (overlapped interruptions), the interrupt controller (INTC) determines their relative priorities and starts the exception handling according to the results. The priority of interrupts is expressed as priority levels 0 to 16, with priority 0 the lowest and priority 16 the highest. The NMI interrupt has priority 16 and cannot be masked, so it is always accepted. The priority level of the user break interrupt and H-UDI is 15. IRQ interrupt and on-chip peripheral module interrupt priority levels can be set freely using the interrupt priority level setting registers A to G (IPRA to IPRG) of the INTC as shown in table 5.8. The priority levels that can be set are 0 to 15. Level 16 cannot be set. For details on IPRA to IPRG, see section 6.3.4, Interrupt Priority Registers A to G (IPRA to IPRG). Table 5.8
Type NMI User break H-UDI IRQ On-chip peripheral module
Interrupt Priority
Priority Level 16 15 15 0 to 15 Comment Fixed priority level. Cannot be masked. Fixed priority level. Can be masked. Fixed priority level. Set with interrupt priority level setting registers A through G (IPRA to IPRG).
5.4.3
Interrupt Exception Handling
When an interrupt occurs, the interrupt controller (INTC) ascertains its priority level. NMI is always accepted, but other interrupts are only accepted if they have a priority level higher than the priority level set in the interrupt mask bits (I3 to I0) of the status register (SR). When an interrupt is accepted, exception handling begins. In interrupt exception handling, the CPU saves SR and the program counter (PC) to the stack. The priority level of the accepted interrupt is written to bits I3 to I0 in SR. Although the priority level of the NMI is 16, the value set in bits I3 to I0 is H'F (level 15). Next, the start address of the exception handling routine is fetched from the exception handling vector table for the accepted interrupt, and program execution branches to that address and the program starts. For details on the interrupt exception handling, see section 6.6, Interrupt Operation.
Rev. 6.00 Jul. 15, 2009 Page 75 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.5
5.5.1
Exceptions Triggered by Instructions
Types of Exceptions Triggered by Instructions
Exception handling can be triggered by the trap instruction, illegal slot instructions, and general illegal instructions, as shown in table 5.9. Table 5.9
Type Trap instruction Illegal slot instructions*
Types of Exceptions Triggered by Instructions
Source Instruction TRAPA Undefined code placed immediately after a delayed branch instruction (delay slot) or instructions that changes the PC value Undefined code anywhere besides in a delay slot Comment Delayed branch instructions: JMP, JSR, BRA, BSR, RTS, RTE, BF/S, BT/S, BSRF, BRAF Instructions that changes the PC value: JMP, JSR, BRA, BSR, RTS, RTE, BT, BF, TRAPA, BF/S, BT/S, BSRF, BRAF, LDC Rm,SR, LDC.L @Rm+,SR
General illegal instructions* Note: *
The operation is not guaranteed when undefined instructions other than H'FC00 to H'FFFF are decoded.
5.5.2
Trap Instructions
When a TRAPA instruction is executed, the trap instruction exception handling starts. The CPU operates as follows: 1. The status register (SR) is saved to the stack. 2. The program counter (PC) is saved to the stack. The PC value saved is the start address of the instruction to be executed after the TRAPA instruction. 3. The CPU reads the start address of the exception handling routine from the exception handling vector table that corresponds to the vector number specified in the TRAPA instruction, program execution branches to that address, and then the program starts. This branch is not a delayed branch.
Rev. 6.00 Jul. 15, 2009 Page 76 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.5.3
Illegal Slot Instructions
An instruction placed immediately after a delayed branch instruction is called "instruction placed in a delay slot". When the instruction placed in the delay slot is an undefined code, illegal slot exception handling starts after the undefined code is decoded. Illegal slot exception handling also starts when an instruction that changes the program counter (PC) value is placed in a delay slot and the instruction is decoded. The CPU handles an illegal slot instruction as follows: 1. The status register (SR) is saved to the stack. 2. The program counter (PC) is saved to the stack. The PC value saved is the target address of the delayed branch instruction immediately before the undefined code or the instruction that rewrites the PC. 3. The start address of the exception handling routine is fetched from the exception handling vector table that corresponds to the exception that occurred. Program execution branches to that address and the program starts. This branch is not a delayed branch. 5.5.4 General Illegal Instructions
When an undefined code placed anywhere other than immediately after a delayed branch instruction (i.e., in a delay slot) is decoded, general illegal instruction exception handling starts. The CPU handles the general illegal instructions in the same procedures as in the illegal slot instructions. Unlike processing of illegal slot instructions, however, the program counter value that is stacked is the start address of the undefined code.
Rev. 6.00 Jul. 15, 2009 Page 77 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.6
Cases when Exceptions are Accepted
When an exception other than resets occurs during decoding the instruction placed in a delay slot or immediately after an interrupt disabled instruction, it may not be accepted and be held shown in table 5.10. In this case, when an instruction which accepts an interrupt request is decoded, the exception is accepted. Table 5.10 Delay Slot Instructions, Interrupt Disabled Instructions, and Exceptions
Exception Address Error x*
2
Occurrence Timing Instruction in delay slot
General Illegal Instruction
Slot Illegal Instruction x*
2
Trap Instruction
Interrupt x*3 x*4
Immediately after interrupt disabled instruction*1
[Legend] : Accepted x: Not accepted : Does not occur Notes: 1. Interrupt disabled instructions: LDC, LDC.L, STC, STC.L, LDS, LDS.L, STS, and STS.L 2. An exception is accepted before the execution of a delayed branch instruction. However, when an address error or a slot illegal instruction exception occurs in the delay slot of the RTE instruction, correct operation is not guaranteed. 3. An exception is accepted after a delayed branch (between instructions in the delay slot and the branch destination). 4. An exception is accepted after the execution of the next instruction of an interrupt disabled instruction (before the execution two instructions after an interrupt disabled instruction).
Rev. 6.00 Jul. 15, 2009 Page 78 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.7
Stack States after Exception Handling Ends
The stack states after exception handling ends are shown in table 5.11. Table 5.11 Stack Status after Exception Handling Ends
Types Address error (when the instruction that caused an exception is placed in the delay slot) Stack State
SP
Address of delayed branch instruction SR
32 bits
32 bits
Address error (other than above)
SP Address of instruction that caused exception SR 32 bits
32 bits
Interrupt
SP Address of instruction after executed instruction SR 32 bits
32 bits
Trap instruction
SP Address of instruction after TRAPA instruction SR 32 bits
32 bits
Rev. 6.00 Jul. 15, 2009 Page 79 of 816 REJ09B0237-0600
Section 5 Exception Handling
Types Illegal slot instruction
Stack State
SP
Address of delayed branch instruction SR
32 bits
32 bits
General illegal instruction
SP Address of general illegal instruction SR 32 bits
32 bits
Rev. 6.00 Jul. 15, 2009 Page 80 of 816 REJ09B0237-0600
Section 5 Exception Handling
5.8
5.8.1
Usage Notes
Value of Stack Pointer (SP)
The SP value must always be a multiple of 4. If it is not, an address error will occur when the stack is accessed during exception handling. 5.8.2 Value of Vector Base Register (VBR)
The VBR value must always be a multiple of 4. If it is not, an address error will occur when the stack is accessed during exception handling. 5.8.3 Address Errors Caused by Stacking for Address Error Exception Handling
When the SP value is not a multiple of 4, an address error will occur when stacking for exception handling (interrupts, etc.) and address error exception handling will start after the first exception handling is ended. Address errors will also occur in the stacking for this address error exception handling. To ensure that address error exception handling does not go into an endless loop, no address errors are accepted at that point. This allows program control to be passed to the handling routine for address error exception and enables error processing. When an address error occurs during exception handling stacking, the stacking bus cycle (write) is executed. When stacking the SR and PC values, the SP values for both are subtracted by 4, therefore, the SP value is still not a multiple of 4 after the stacking. The address value output during stacking is the SP value whose lower two bits are cleared to 0. So the write data stacked is undefined. 5.8.4 Notes on Slot Illegal Instruction Exception Handling
Some specifications on slot illegal instruction exception handling in this LSI differ from those of the conventional SH2. * Conventional SH2: Instructions LDC Rm,SR and LDC.L @Rm+,SR are not subject to the slot illegal instructions. * This LSI: Instructions LDC Rm,SR and LDC.L @Rm+,SR are subject to the slot illegal instructions. The supporting status on our software products regarding this note is as follows:
Rev. 6.00 Jul. 15, 2009 Page 81 of 816 REJ09B0237-0600
Section 5 Exception Handling
Compiler This instruction is not allocated in the delay slot in the compiler V.4 and its subsequent versions. Real-time OS for ITRON specifications 1. HI7000/4, HI-SH7 This instruction does not exist in the delay slot within the OS. 2. HI7000 This instruction is in part allocated to the delay slot within the OS, which may cause the slot illegal instruction exception handling in this LSI. 3. Others The slot illegal instruction exception handling may be generated in this LSI in a case where the instruction is described in assembler or when the middleware of the object is introduced. Note that a check-up program (checker) to pick up this instruction is available on our website. Download and utilize this checker as needed.
Rev. 6.00 Jul. 15, 2009 Page 82 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Section 6 Interrupt Controller (INTC)
The interrupt controller (INTC) ascertains the priority of interrupt sources and controls interrupt requests to the CPU.
6.1
Features
* 16 levels of interrupt priority Figure 6.1 shows a block diagram of the INTC.
Rev. 6.00 Jul. 15, 2009 Page 83 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
NMI IRQ0
. . .
. . .
Input control
Comparator
IRQ7 UBC H-UDI WDT E-DMAC CMT0 CMT1 SCIF0 SCIF1 SCIF2 HIF DMAC SIOF (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) (Interrupt request) Priority determination
Interrupt request SR I3 I2 I1 I0 CPU
DTER ICR0 IRQCR IRQSR IPRA to IPRE IPR DTC
Module bus
Bus interface
INTC [Legend] UBC: H-UDI: WDT: E-DMAC: CMT: SCIF: User break controller User debugging interface Watchdog timer DMAC for Ethernet controller Compare match timer Serial communications interface with FIFO HIF: DMAC: ICR0: IRQCR: IRQSR: IPRA to IPRG: SR: Host interface Direct memory access controller Interrupt control register 0 IRQ control register IRQ status register Interrupt priority registers A to G Status register
Figure 6.1 INTC Block Diagram
Rev. 6.00 Jul. 15, 2009 Page 84 of 816 REJ09B0237-0600
Internal bus
Section 6 Interrupt Controller (INTC)
6.2
Input/Output Pins
Table 6.1 shows the INTC pin configuration. Table 6.1
Name Non-maskable interrupt input pin Interrupt request input pins
Pin Configuration
Abbr. NMI IRQ0 to IRQ7 I/O Input Input Function Input of non-maskable interrupt request signal Input of maskable interrupt request signals
6.3
Register Descriptions
The interrupt controller has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * * * * * * * * * * Interrupt control register 0 (ICR0) IRQ control register (IRQCR) IRQ status register (IRQSR) Interrupt priority register A (IPRA) Interrupt priority register B (IPRB) Interrupt priority register C (IPRC) Interrupt priority register D (IPRD) Interrupt priority register E (IPRE) Interrupt priority register F (IPRF) Interrupt priority register G (IPRG)
Rev. 6.00 Jul. 15, 2009 Page 85 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.3.1
Interrupt Control Register 0 (ICR0)
ICR0 is a 16-bit register that sets the input signal detection mode of the external interrupt input pin NMI and indicates the input signal level on the NMI pin.
Bit 15 Initial Bit Name Value NMIL 1/0 R/W R Description NMI Input Level Indicates the state of the signal input to the NMI pin. This bit can be read to determine the NMI pin level. This bit cannot be modified. 0: State of the NMI input is low 1: State of the NMI input is high 14 to 9 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 8 NMIE 0 R/W NMI Edge Select 0: Interrupt request is detected on the falling edge of the NMI input 1: Interrupt request is detected on the rising edge of the NMI input 7 to 0 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 86 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.3.2
IRQ Control Register (IRQCR)
IRQCR is a 16-bit register that sets the input signal detection mode of the external interrupt input pins IRQ0 to IRQ7.
Bit 15 14 Bit Name IRQ71S IRQ70S Initial Value 0 0 R/W R/W R/W Description IRQ7 Sense Select Set the interrupt request detection mode for pin IRQ7. 00: Interrupt request is detected at the low level of pin IRQ7 01: Interrupt request is detected at the falling edge of pin IRQ7 10: Interrupt request is detected at the rising edge of pin IRQ7 11: Interrupt request is detected at both the falling and rising edges of pin IRQ7 13 12 IRQ61S IRQ60S 0 0 R/W R/W IRQ6 Sense Select Set the interrupt request detection mode for pin IRQ6. 00: Interrupt request is detected at the low level of pin IRQ6 01: Interrupt request is detected at the falling edge of pin IRQ6 10: Interrupt request is detected at the rising edge of pin IRQ6 11: Interrupt request is detected at both the falling and rising edges of pin IRQ6
Rev. 6.00 Jul. 15, 2009 Page 87 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 11 10
Bit Name IRQ51S IRQ50S
Initial Value 0 0
R/W R/W R/W
Description IRQ5 Sense Select Set the interrupt request detection mode for pin IRQ5. 00: Interrupt request is detected at the low level of pin IRQ5 01: Interrupt request is detected at the falling edge of pin IRQ5 10: Interrupt request is detected at the rising edge of pin IRQ5 11: Interrupt request is detected at both the falling and rising edges of pin IRQ5
9 8
IRQ41S IRQ40S
0 0
R/W R/W
IRQ4 Sense Select Set the interrupt request detection mode for pin IRQ4. 00: Interrupt request is detected at the low level of pin IRQ4 01: Interrupt request is detected at the falling edge of pin IRQ4 10: Interrupt request is detected at the rising edge of pin IRQ4 11: Interrupt request is detected at both the falling and rising edges of pin IRQ4
7 6
IRQ31S IRQ30S
0 0
R/W R/W
IRQ3 Sense Select Set the interrupt request detection mode for pin IRQ3. 00: Interrupt request is detected at the low level of pin IRQ3 01: Interrupt request is detected at the falling edge of pin IRQ3 10: Interrupt request is detected at the rising edge of pin IRQ3 11: Interrupt request is detected at both the falling and rising edges of pin IRQ3
Rev. 6.00 Jul. 15, 2009 Page 88 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 5 4
Bit Name IRQ21S IRQ20S
Initial Value 0 0
R/W R/W R/W
Description IRQ2 Sense Select Set the interrupt request detection mode for pin IRQ2. 00: Interrupt request is detected at the low level of pin IRQ2 01: Interrupt request is detected at the falling edge of pin IRQ2 10: Interrupt request is detected at the rising edge of pin IRQ2 11: Interrupt request is detected at both the falling and rising edges of pin IRQ2
3 2
IRQ11S IRQ10S
0 0
R/W R/W
IRQ1 Sense Select Set the interrupt request detection mode for pin IRQ1. 00: Interrupt request is detected at the low level of pin IRQ1 01: Interrupt request is detected at the falling edge of pin IRQ1 10: Interrupt request is detected at the rising edge of pin IRQ1 11: Interrupt request is detected at both the falling and rising edges of pin IRQ1
1 0
IRQ01S IRQ00S
0 0
R/W R/W
IRQ0 Sense Select Set the interrupt request detection mode for pin IRQ0. 00: Interrupt request is detected at the low level of pin IRQ0 01: Interrupt request is detected at the falling edge of pin IRQ0 10: Interrupt request is detected at the rising edge of pin IRQ0 11: Interrupt request is detected at both the falling and rising edges of pin IRQ0
Rev. 6.00 Jul. 15, 2009 Page 89 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.3.3
IRQ Status register (IRQSR)
IRQSR is a 16-bit register that indicates the states of the external interrupt input pins IRQ0 to IRQ7 and the status of interrupt request.
Bit 15 Bit Name IRQ7L Initial Value 0/1 R/W R Description Indicates the state of pin IRQ7. 0: State of pin IRQ7 is low 1: State of pin IRQ7 is high 14 IRQ6L 0/1 R Indicates the state of pin IRQ6. 0: State of pin IRQ6 is low 1: State of pin IRQ6 is high 13 IRQ5L 0/1 R Indicates the state of pin IRQ5. 0: State of pin IRQ5 is low 1: State of pin IRQ5 is high 12 IRQ4L 0 or 1 R Indicates the state of pin IRQ4. 0: State of pin IRQ4 is low 1: State of pin IRQ4 is high 11 IRQ3L 0 or 1 R Indicates the state of pin IRQ3. 0: State of pin IRQ3 is low 1: State of pin IRQ3 is high 10 IRQ2L 0 or 1 R Indicates the state of pin IRQ2. 0: State of pin IRQ2 is low 1: State of pin IRQ2 is high 9 IRQ1L 0 or 1 R Indicates the state of pin IRQ1. 0: State of pin IRQ1 is low 1: State of pin IRQ1 is high 8 IRQ0L 0 or 1 R Indicates the state of pin IRQ0. 0: State of pin IRQ0 is low 1: State of pin IRQ0 is high
Rev. 6.00 Jul. 15, 2009 Page 90 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 7
Bit Name IRQ7F
Initial Value 0
R/W R/W
Description Indicates the status of an IRQ7 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ7 high 1: An IRQ7 interrupt has been detected [Setting condition] Driving pin IRQ7 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ7F = 1 Accepting an IRQ7 interrupt 1: An IRQ7 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ7 0: An IRQ7 interrupt has not been detected 0: An IRQ7 interrupt has not been detected
6
IRQ6F
0
R/W
Indicates the status of an IRQ6 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ6 high 1: An IRQ6 interrupt has been detected [Setting condition] Driving pin IRQ6 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ6F = 1 Accepting an IRQ6 interrupt 1: An IRQ6 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ6 0: An IRQ6 interrupt has not been detected 0: An IRQ6 interrupt has not been detected
Rev. 6.00 Jul. 15, 2009 Page 91 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 5
Bit Name IRQ5F
Initial Value 0
R/W R/W
Description Indicates the status of an IRQ5 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ5 high 1: An IRQ5 interrupt has been detected [Setting condition] Driving pin IRQ5 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ5F = 1 Accepting an IRQ5 interrupt 1: An IRQ5 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ5 0: An IRQ5 interrupt has not been detected 0: An IRQ5 interrupt has not been detected
4
IRQ4F
0
R/W
Indicates the status of an IRQ4 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ4 high 1: An IRQ4 interrupt has been detected [Setting condition] Driving pin IRQ4 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ4F = 1 Accepting an IRQ4 interrupt 1: An IRQ4 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ4 0: An IRQ4 interrupt has not been detected 0: An IRQ4 interrupt has not been detected
Rev. 6.00 Jul. 15, 2009 Page 92 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 3
Bit Name IRQ3F
Initial Value 0
R/W R/W
Description Indicates the status of an IRQ3 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ3 high 1: An IRQ3 interrupt has been detected [Setting condition] Driving pin IRQ3 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ3F = 1 Accepting an IRQ3 interrupt 1: An IRQ3 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ3 0: An IRQ3 interrupt has not been detected 0: An IRQ3 interrupt has not been detected
2
IRQ2F
0
R/W
Indicates the status of an IRQ2 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ2 high 1: An IRQ2 interrupt has been detected [Setting condition] Driving pin IRQ2 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ2F = 1 Accepting an IRQ2 interrupt 1: An IRQ2 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ2 0: An IRQ2 interrupt has not been detected 0: An IRQ2 interrupt has not been detected
Rev. 6.00 Jul. 15, 2009 Page 93 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 1
Bit Name IRQ1F
Initial Value 0
R/W R/W
Description Indicates the status of an IRQ1 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ1 high 1: An IRQ1 interrupt has been detected [Setting condition] Driving pin IRQ1 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ1F = 1 Accepting an IRQ1 interrupt 1: An IRQ1 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ1 0: An IRQ1 interrupt has not been detected 0: An IRQ1 interrupt has not been detected
0
IRQ0F
0
R/W
Indicates the status of an IRQ0 interrupt request. * When level detection mode is selected [Clearing condition] Driving pin IRQ0 high 1: An IRQ0 interrupt has been detected [Setting condition] Driving pin IRQ0 low * When edge detection mode is selected [Clearing conditions] Writing 0 after reading IRQ0F = 1 Accepting an IRQ0 interrupt 1: An IRQ0 interrupt request has been detected [Setting condition] Detecting the specified edge of pin IRQ0 0: An IRQ0 interrupt has not been detected 0: An IRQ0 interrupt has not been detected
Rev. 6.00 Jul. 15, 2009 Page 94 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.3.4
Interrupt Priority Registers A to G (IPRA to IPRG)
Interrupt priority registers are seven 16-bit readable/writable registers that set priority levels from 0 to 15 for interrupts except NMI. For the correspondence between interrupt request sources and IPR, refer to table 6.2, Interrupt Exception Handling Vectors and Priorities. Each of the corresponding interrupt priority ranks are established by setting a value from H'0 to H'F in each of the four-bit groups 15 to 12, 11 to 8, 7 to 4 and 3 to 0. Reserved bits that are not assigned should be set H'0 (B'0000).
Bit 15 14 13 12 Bit Name IPR15 IPR14 IPR13 IPR12 Initial Value 0 0 0 0 R/W R/W R/W R/W R/W Description Set priority levels for the corresponding interrupt source. 0000: 0001: 0010: 0011: 0100: 0101: 0110: 0111: 1000: 1001: 1010: 1011: 1100: 1101: 1110: 1111: Priority level 0 (lowest) Priority level 1 Priority level 2 Priority level 3 Priority level 4 Priority level 5 Priority level 6 Priority level 7 Priority level 8 Priority level 9 Priority level 10 Priority level 11 Priority level 12 Priority level 13 Priority level 14 Priority level 15 (highest)
Rev. 6.00 Jul. 15, 2009 Page 95 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 11 10 9 8
Bit Name IPR11 IPR10 IPR9 IPR8
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Set priority levels for the corresponding interrupt source. 0000: 0001: 0010: 0011: 0100: 0101: 0110: 0111: 1000: 1001: 1010: 1011: 1100: 1101: 1110: 1111: Priority level 0 (lowest) Priority level 1 Priority level 2 Priority level 3 Priority level 4 Priority level 5 Priority level 6 Priority level 7 Priority level 8 Priority level 9 Priority level 10 Priority level 11 Priority level 12 Priority level 13 Priority level 14 Priority level 15 (highest)
7 6 5 4
IPR7 IPR6 IPR5 IPR4
0 0 0 0
R/W R/W R/W R/W
Set priority levels for the corresponding interrupt source. 0000: 0001: 0010: 0011: 0100: 0101: 0110: 0111: 1000: 1001: 1010: 1011: 1100: 1101: 1110: 1111: Priority level 0 (lowest) Priority level 1 Priority level 2 Priority level 3 Priority level 4 Priority level 5 Priority level 6 Priority level 7 Priority level 8 Priority level 9 Priority level 10 Priority level 11 Priority level 12 Priority level 13 Priority level 14 Priority level 15 (highest)
Rev. 6.00 Jul. 15, 2009 Page 96 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Bit 3 2 1 0
Bit Name IPR3 IPR2 IPR1 IPR0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Set priority levels for the corresponding interrupt source. 0000: 0001: 0010: 0011: 0100: 0101: 0110: 0111: 1000: 1001: 1010: 1011: 1100: 1101: 1110: 1111: Priority level 0 (lowest) Priority level 1 Priority level 2 Priority level 3 Priority level 4 Priority level 5 Priority level 6 Priority level 7 Priority level 8 Priority level 9 Priority level 10 Priority level 11 Priority level 12 Priority level 13 Priority level 14 Priority level 15 (highest)
Note: Name in the tables above is represented by a general name. Name in the list of register is, on the other hand, represented by a module name.
6.4
6.4.1
Interrupt Sources
External Interrupts
There are five types of interrupt sources: User break, NMI, H-UDI, IRQ, and on-chip peripheral modules. Individual interrupts are given priority levels (0 to 16, with 0 the lowest and 15 the highest). Giving an interrupt a priority level of 0 masks it. NMI Interrupt: The NMI interrupt is given a priority level of 16 and is always accepted. An NMI interrupt is detected at the edge of the pins. Use the NMI edge select bit (NMIE) in interrupt control register 0 (ICR0) to select either the rising or falling edge. In the NMI interrupt exception handler, the interrupt mask level bits (I3 to I0) in the status register (SR) are set to level 15.
Rev. 6.00 Jul. 15, 2009 Page 97 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
IRQ7 to IRQ0 Interrupts: IRQ interrupts are requested by input from pins IRQ0 to IRQ7. Use the IRQ sense select bits (IRQ71S to IRQ 01S and IRQ70S to IRQ00S) in the IRQ control register (IRQCR) to select the detection mode from low level detection, falling edge detection, rising edge detection, and both edge detection for each pin. The priority level can be set from 0 to 15 for each pin using the interrupt priority registers A and B (IPRA and IPRB). In the case that the low level detection is selected, an interrupt request signal is sent to the INTC while the IRQ pin is driven low. The interrupt request signal stops to be sent to the INTC when the IRQ pin becomes high. It is possible to confirm that an interrupt is requested by reading the IRQ flags (IRQ7F to IRQ0F) in the IRQ status register (IRQSR). In the case that the edge detection is selected, an interrupt request signal is sent to the INTC when the following change on the IRQ pin is detected: from high to low in falling edge detection mode, from low to high in rising edge detection mode, and from low to high or from high to low in both edge detection mode. The IRQ interrupt request by detecting the change on the pin is held until the interrupt request is accepted. It is possible to confirm that an IRQ interrupt request has been detected by reading the IRQ flags (IRQ7F to IRQ0F) in the IRQ status register (IRQSR). An IRQ interrupt request by detecting the change on the pin can be withdrawn by writing 0 to an IRQ flag after reading 1. In the IRQ interrupt exception handling, the interrupt mask bits (I3 to I0) in the status register (SR) are set to the priority level value of the accepted IRQ interrupt. Figure 6.2 shows the block diagram of the IRQ7 to IRQ0 interrupts.
IRQSR.IRQnL IRQCR.IRQn1S IRQCR.IRQn0S IRQSR.IRQnF
Selection
IRQn pins
Level detection Edge detection S Q
CPU interrupt request
RESIRQn (Acceptance of IRQn interrupt/ writing 0 after reading IRQnF = 1)
R
n = 7 to 0
Figure 6.2 Block Diagram of IRQ7 to IRQ0 Interrupts Control
Rev. 6.00 Jul. 15, 2009 Page 98 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.4.2
On-Chip Peripheral Module Interrupts
On-chip peripheral module interrupts are interrupts generated by the following on-chip peripheral modules. Since a different interrupt vector is allocated to each interrupt source, the exception handling routine does not have to decide which interrupt has occurred. Priority levels between 0 and 15 can be allocated to individual on-chip peripheral modules in interrupt priority registers C to G (IPRC to IPRG). On-chip peripheral module interrupt exception handling sets the interrupt mask level bits (I3 to I0) in the status register (SR) to the priority level value of the on-chip peripheral module interrupt that was accepted. 6.4.3 User Break Interrupt
A user break interrupt has a priority level of 15, and occurs when the break condition set in the user break controller (UBC) is satisfied. User break interrupt requests are detected by edge and are held until accepted. User break interrupt exception handling sets the interrupt mask level bits (I3 to I0) in the status register (SR) to level 15. For more details on the user break interrupt, see section 20, User Break Controller (UBC). 6.4.4 H-UDI Interrupt
User debugging interface (H-UDI) interrupt has a priority level of 15, and occurs when an H-UDI interrupt instruction is serially input. H-UDI interrupt requests are detected by edge and are held until accepted. H-UDI exception handling sets the interrupt mask level bits (I3-I0) in the status register (SR) to level 15. For more details on the H-UDI interrupt, see section 21, User Debugging Interface (H-UDI).
Rev. 6.00 Jul. 15, 2009 Page 99 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.5
Interrupt Exception Handling Vector Table
Table 6.2 lists interrupt sources, their vector numbers, vector table address offsets, and interrupt priorities. Individual interrupt sources are allocated to different vector numbers and vector table address offsets. Vector table addresses are calculated from the vector numbers and vector table address offsets. For interrupt exception handling, the start address of the exception handling routine is fetched from the vector table address in the vector table. For the details on calculation of vector table addresses, see table 5.4, Calculating Exception Handling Vector Table Addresses in section 5, Exception Handling. IRQ interrupts and on-chip peripheral module interrupt priorities can be set freely between 0 and 15 for each pin or module by setting interrupt priority registers A to G (IPRA to IPRG). However, when interrupt sources whose priority levels are allocated with the same IPR are requested, the interrupt of the smaller vector number has priority. This priority cannot be changed. Priority levels of IRQ interrupts and on-chip peripheral module interrupts are initialized to level 0 at a power-on reset. If the same priority level is allocated to two or more interrupt sources and interrupts from those sources occur simultaneously, they are processed by the default priority order shown in table 6.2. Table 6.2
Interrupt Source User break External pin H-UDI External pin IRQ0 IRQ1 IRQ2 IRQ3 IRQ4 IRQ5 IRQ6 IRQ7 NMI
Interrupt Exception Handling Vectors and Priorities
Name Vector No. 12 11 13 64 65 66 67 80 81 82 83 Vector Table Starting Address H'00000030 H'0000002C H'00000034 H'00000100 H'00000104 H'00000108 H'0000010C H'00000140 H'00000144 H'00000148 H'0000014C IPR IPRA15 to IPRA12 IPRA11 to IPRA8 IPRA7 to IPRA4 IPRA3 to IPRA0 IPRB15 to IPRB12 IPRB11 to IPRB8 IPRB7 to IPRB4 IPRB3 to IPRB0 Low Default Priority High
Rev. 6.00 Jul. 15, 2009 Page 100 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Interrupt Source WDT E-DMAC CMT channel 0 CMT channel 1 SCIF channel 0
Name ITI EINT0 CMI0 CMI1 ERI_0 RXI_0 BRI_0 TXI_0
Vector No. 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 104 105 106 107 108
Vector Table Starting Address H'00000150 H'00000154 H'00000158 H'0000015C H'00000160 H'00000164 H'00000168 H'0000016C H'00000170 H'00000174 H'00000178 H'0000017C H'00000180 H'00000184 H'00000188 H'0000018C H'00000190 H'00000194 H'000001A0 H'000001A4 H'000001A8 H'000001AC H'000001B0
IPR IPRC15 to IPRC12 IPRC11 to IPRC8 IPRC7 to IPRC4 IPRC3 to IPRC0 IPRD15 to IPRD12
Default Priority Hight
SCIF channel 1
ERI_1 RXI_1 BRI_1 TXI_1
IPRD11 to IPRD8
SCIF channel 2
ERI_2 RXI_2 BRI_2 TXI_2
IPRD7 to IPRD4
HIF
HIFI HIFBI
IPRE15 to IPRE12 IPRE11 to IPRE8 IPRF15 to IPRF12 IPRF11 to IPRF8 IPRF7 to IPRF4 IPRF3 to IPRF0 IPRG15 to IPRG12 Low
DMAC
DEI0 DEI1 DEI2 DEI3
SIOF
SIOFI
Rev. 6.00 Jul. 15, 2009 Page 101 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.6
6.6.1
Interrupt Operation
Interrupt Sequence
The sequence of interrupt operations is explained below. Figure 6.3 is a flowchart of the operations. 1. The interrupt request sources send interrupt request signals to the interrupt controller. 2. The interrupt controller selects the highest priority interrupt from interrupt requests sent, according to the priority levels set in interrupt priority level setting registers A to G (IPRA to IPRG). Interrupts that have lower-priority than that of the selected interrupt are ignored*. If interrupts that have the same priority level or interrupts within a same module occur simultaneously, the interrupt with the highest priority is selected according to the priority shown in table 6.2. 3. The interrupt controller compares the priority level of the selected interrupt request with the interrupt mask bits (I3 to I0) in the status register (SR) of the CPU. If the priority level of the selected request is equal to or less than the level set in bits I3 to I0, the request is ignored. If the priority level of the selected request is higher than the level in bits I3 to I0, the interrupt controller accepts the request and sends an interrupt request signal to the CPU. 4. The CPU detects the interrupt request sent from the interrupt controller in the decode stage of an instruction to be executed. Instead of executing the decoded instruction, the CPU starts interrupt exception handling. 5. SR and PC are saved onto the stack. 6. The priority level of the accepted interrupt is copied to bits (I3 to I0) in SR. 7. The CPU reads the start address of the exception handling routine from the exception vector table for the accepted interrupt, branches to that address, and starts executing the program. This branch is not a delayed branch. Note: * Interrupt requests that are designated as edge-detect type are held pending until the interrupt requests are accepted. IRQ interrupts, however, can be cancelled by accessing the IRQ status register (IRQSR). Interrupts held pending due to edge detection are cleared by a power-on reset or an H-UDI reset.
Rev. 6.00 Jul. 15, 2009 Page 102 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Program execution state
Interrupt?
Yes User break? Yes
No
No
NMI? Yes
No
H-UDI interrupt?
No
Yes
Level 15 interrupt?
No
Yes
I3 to I0 level 14? Yes
Yes
No
I3 to I0 level 14? No Yes
Level 14 interrupt? Yes I3 to I0 level 13? No Yes
No
Level 1 interrupt? Yes I3 to I0 = level 0? No
No
Save SR to stack Save PC to stack Copy interrupt level to I3 to I0 Read exception vector table Branch to exception handling routine
Note: I3 to I0 are Interrupt mask bits in the status register (SR) of the CPU
Figure 6.3 Interrupt Sequence Flowchart
Rev. 6.00 Jul. 15, 2009 Page 103 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
6.6.2
Stack after Interrupt Exception Handling
Figure 6.4 shows the stack after interrupt exception handling.
Address 4n - 8 4n - 4 4n PC*1 SR 32 bits 32 bits SP*2
Notes: 1. PC is the start address of the next instruction (instruction at the return address) after the executed instruction. 2. Always make sure that SP is a multiple of 4
Figure 6.4 Stack after Interrupt Exception Handling
6.7
Interrupt Response Time
Table 6.3 lists the interrupt response time, which is the time from the occurrence of an interrupt request until the interrupt exception handling starts and fetching of the first instruction of the interrupt handling routine begins.
Rev. 6.00 Jul. 15, 2009 Page 104 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Table 6.3
Interrupt Response Time
Number of Cycles
Item Interrupt priority decision and comparison with mask bits in SR Wait for completion of sequence currently being executed by CPU
NMI, H-UDI 1 x Icyc + 2 x Pcyc
IRQ, Peripheral Modules 1 x Icyc + 3 x Pcyc
Remarks
X ( 0)
X ( 0)
The longest sequence is for interrupt or addresserror exception handling (X = 7 x Icyc + m1 + m2 + m3 + m4). If an interrupt-masking instruction follows, however, the time may be even longer. Performs the saving PC and SR, and vector address fetch.
Time from start of interrupt exception handling until fetch of first instruction of exception handling routine starts Interrupt response time Total:
8 x Icyc + m1 + m2 8 x Icyc + m1 + m2 + m3 + m3
9 x Icyc + 2 x Pcyc + m1 + m2 + m3 +X 12 x Icyc + 2 x Pcyc
9 x Icyc + 3 x Pcyc + m1 + m2 + m3 +X 12 x Icyc + 3 x Pcyc SR, PC, and vector table are all in on-chip RAM, or cache hit occurs (in write back mode).
Minimum*:
Maximum:
16 x Icyc + 2 x Pcyc + 2 x (m1 + m2 + m3) + m4
16 x Icyc + 3 x Pcyc + 2 x (m1 + m2 + m3) + m4
Notes: *
In the case that m1 = m2 = m3 = m4 = 1 x Icyc. m1 to m4 are the number of cycles needed for the following memory accesses. m1: SR save (longword write) m2: PC save (longword write) m3: Vector address read (longword read) m4: Fetch first instruction of interrupt service routine
Rev. 6.00 Jul. 15, 2009 Page 105 of 816 REJ09B0237-0600
Section 6 Interrupt Controller (INTC)
Rev. 6.00 Jul. 15, 2009 Page 106 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Section 7 Bus State Controller (BSC)
The bus state controller (BSC) outputs control signals for various types of memory that is connected to the external address space and external devices. The BSC functions enable this LSI to connect directly with SRAM, SDRAM, and other memory storage devices, and external devices.
7.1
Features
The BSC has the following features. * External address space A maximum 32 or 64 Mbytes for each of the areas, CS0, CS3, CS4, CS5B, and CS6B, totally 256 Mbytes (divided into five areas) A maximum 64 Mbytes for each of the six areas, CS0, CS3, CS4, CS5, and CS6, totally 320 Mbytes (divided into five areas) Can specify the normal space interface, byte-selection SRAM, SDRAM, PCMCIA for each address space Can select the data bus width (8, 16, or 32 bits) for each address space. (The CS0 data bus width can only be selected from 8 or 16 bits.) Can control the insertion of wait cycles for each address space Can control the insertion of wait cycles for each read access and write access Can control the insertion of idle cycles in the consecutive access for five cases independently: read-write (in same space/different space), read-read (in same space/different space), or the first cycle is a write access * Normal space interface Supports the interface that can directly connect to the SRAM * SDRAM interface Can connect directly to SDRAM in area 3 Multiplex output for row address/column address Efficient access by single read/single write High-speed access by bank-active mode Supports auto-refreshing and self-refreshing
Rev. 6.00 Jul. 15, 2009 Page 107 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
* Byte-selection SRAM interface Can connect directly to byte-selection SRAM * PCMCIA direct interface Supports IC memory cards and I/O card interfaces defined in the JEIDA specifications Ver 4.2 (PCMCIA2.1 Rev 2.1) Controls the insertion of wait cycles by software Supports the bus sizing function of the I/O bus width (only in little endian mode) * Refresh function Supports the auto-refreshing and self-refreshing functions Specifies the refresh interval by setting the refresh counter and clock selection Can execute consecutive refresh cycles by specifying the refresh counts (1, 2, 4, 6, or 8)
Rev. 6.00 Jul. 15, 2009 Page 108 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
The block diagram of the BSC is shown in figure 7.1.
Bus mastership controller
CMNCR
Internal bus
Internal master module
Internal slave module
CS0WCR WAIT Wait controller
...
...
CS6BWCR RWTCNT CS0, CS3, CS4, CS5B (CE1A), CS6B (CE1B) MD5 A25 to A0, D31 to D0, BS, RD/WR, RD, WE3 (BE3, DQMUU), WE2 (BE2, DQMUU), WE1 (BE1, DQMUU,WE), WE0 (BE0, DQMLL), ICIOWR, ICIORD, RAS, CAS, CKE, CE2A, CE2B IOIS16
CS6BBCR
Memory controller
SDCR RTCSR RTCNT Refresh controller
Comparator
RTCOR BSC Common control register CSn space wait control register (n = 0, 3, 4, 5B, 6B) Reset wait counter CSn space bus control register (n = 0, 3, 4, 5B, 6B) SDRAM control register Refresh timer control/status register Refresh timer counter Refresh time constant register
[Legend] CMNCR: CSnWCR: RWTCNT: CSnBCR: SDCR: RTCSR: RTCNT: RTCOR:
Figure 7.1 Block Diagram of BSC
Rev. 6.00 Jul. 15, 2009 Page 109 of 816 REJ09B0237-0600
Module bus
Area controller
CS0BCR
... ...
...
Section 7 Bus State Controller (BSC)
7.2
Input/Output Pins
table 7.1 lists the pin configuration of the BSC. Table 7.1 Pin Configuration
I/O Function
Abbreviation A25 to A0 D31 to D0 BS
Output Address Bus* I/O Data Bus Asserted when a normal space, burst ROM (clock synchronous /asynchronous), or PCMCIA is accessed. Asserted at the same timing as CAS assertion in SDRAM access.
Output Bus Cycle Start
CS0, CS3, CS4 Output Chip Select CS5B/CE1A CE2A CS6B/CE1B CE2B RD/WR RD ICIOWR ICIORD WE3(BE3) WE2(BE2) WE1(BE1)/WE Output Chip Select Chip enable for PCMCIA allocated to area 5 when PCMCIA is in use Output Chip enable for PCMCIA allocated to area 5 when PCMCIA is in use Output Chip Select Chip enable for PCMCIA allocated to area 6 when PCMCIA is in use Output Chip enable for PCMCIA allocated to area 6 when PCMCIA is in use Output Read/Write Connects to WE pins when SDRAM or byte-selection SRAM is used. Output Read Pulse Signal (read data output enable signal) Strobe signal to indicate a memory read cycle when PCMCIA is in use. Output Strobe signal to indicate I/O write when PCMCIA is in use. Output Strobe signal to indicate I/O read when PCMCIA is in use. Output Indicates that D31 to D24 are being written to. Connected to the byte select signal when byte-selection SRAM is in use. Output Indicates that D23 to D16 are being written to. Connected to the byte select signal when byte-selection SRAM is in use. Output Indicates that D15 to D8 are being written to. Connected to the byte select signal when byte-selection SRAM is in use. Strove signal to indicate a memory write cycle when PCMCIA is in use.
Rev. 6.00 Jul. 15, 2009 Page 110 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Abbreviation WE0(BE0)
I/O
Function
Output Indicates that D7 to D0 are being written to. Connected to the byte select signal when a byte-selection SRAM is in use.
RAS CAS CKE IOIS16
Output Connected to RAS pin when SDRAM is in use. Output Connected to CAS pin when SDRAM is in use. Output Connected to CKE pin when SDRAM is in use. Input PCMCIA 16-bit I/O Signal Enabled only in little endian mode. Drive this signal low in big endian mode.
DQMUU, DQMUL, DQMLU, DQMLL
Output Connected to the DQMxx pin when SDRAM is in use. DQMUU: Select signal for D31 to D24 DQMUL: Select signal for D23 to D16 DQMLU: Select signal for D15 to D8 DQMLL: Select signal for D7 to D0
WAIT MD5, MD3 Note: *
Input Input
External wait input MD5: Selects data alignment (big endian or little endian) MD3: Specifies area 0 bus width (8/16 bits)
As pins A25 to A16 act as general I/O ports immediately after a power-on reset, pull-up or pull-down these pins outside the LSI as needed.
7.3
7.3.1
Area Overview
Area Division
The architecture of this LSI has 32-bit address space. The upper three address bits divide the space into areas P0 to P4, and the cache access methods can be specified for each area. For details, see section 3, Cache. Each area indicated by the remaining 29 bits is divided into ten areas (five areas are reserved) when address map 1 is selected or eight areas (three areas are reserved) when address map 2 is selected. The address map is selected by the MAP bit in CMNCR. The BSC controls the areas indicated by the 29 bits. As listed in tables 7.2 and 7.3, memory can be connected directly to five physical areas of this LSI, and the chip select signals (CS0, CS3, CS4, CS5B, and CS6B) are output for each area. CS0 is asserted during area 0 access.
Rev. 6.00 Jul. 15, 2009 Page 111 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.3.2
Shadow Area
Areas 0, 3, 4, 5B, and 6B are divided by decoding physical address bits A28 to A25, which correspond to areas 000 to 111. Address bits 31 to 29 are ignored. This means that the range of area 0 addresses, for example, is H'00000000 to H'03FFFFFF, and its corresponding shadow space is the address space in P1 to P3 areas obtained by adding to it H'20000000 x n (n = 1 to 6). The address range for area 7 is H'1C000000 to H'1FFFFFFF. The address space H'1C000000 + H'20000000 x n to H'1FFFFFFF + H'20000000 x n (n = 0 to 6) corresponding to the area 7 shadow spaces are reserved, so do not use it. Area P4 (H'E0000000 to H'EFFFFFFF) is an I/O area and is allocated to internal register addresses. Therefore, area P4 does not become shadow space.
H'00000000 H'20000000 H'40000000 H'60000000 H'80000000 P1 H'A0000000 P2 H'C0000000 P3 H'E0000000 P4 Address Space P0
Area 0 (CS0) Area 1 (reserved) Area 2 (reserved) Area 3 (CS3) Area 4 (CS4) Area 5A (reserved) Area 5B (CS5B) Area 6A (reserved) Area 6B (CS6B) Area 7 (reserved) Physical address space
Figure 7.2 Address Space 7.3.3 Address Map
The external address space has a capacity of 256 Mbytes and is divided into five areas. Types of memory to be connected and the data bus width are specified for individual areas. The address map for the external address space is shown in table 7.2.
Rev. 6.00 Jul. 15, 2009 Page 112 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.2
Address Map 1 (CMNCR.MAP = 0)
Area Area 0 Area 1 Area 2 Area 3 Memory to be Connected Normal memory Reserved area* Reserved area* Normal memory Byte-selection SRAM SDRAM Capacity 64 Mbytes 64 Mbytes 64 Mbytes 64 Mbytes
Physical Address H'00000000 to H'03FFFFFF H'04000000 to H'07FFFFFF H'08000000 to H'0BFFFFFF H'0C000000 to H'0FFFFFFF
H'10000000 to H'13FFFFFF H'14000000 to H'15FFFFFF H'16000000 to H'17FFFFFF H'18000000 to H'19FFFFFF H'1A000000 to H'1BFFFFFF H'1C000000 to H'1FFFFFFF Note: *
Area 4 Area 5A Area 5B Area 6A Area 6B Area 7
Normal memory Byte-selection SRAM Reserved area* Normal memory Byte-selection SRAM Reserved area* Normal memory Byte-selection SRAM Reserved area*
64 Mbytes 32 Mbytes 32 Mbytes 32 Mbytes 32 Mbytes 64 Mbytes
Do not access the reserved area. If the reserved area is accessed, the correct operation cannot be guaranteed.
Table 7.3
Address Map 2 (CMNCR.MAP = 1)
Area Area 0 Area 1 Area 2 Area 3 Memory to be Connected Normal memory Reserved area*
1
Physical Address H'00000000 to H'03FFFFFF H'04000000 to H'07FFFFFF H'08000000 to H'0BFFFFFF H'0C000000 to H'0FFFFFFF
Capacity 64 Mbytes 64 Mbytes 64 Mbytes 64 Mbytes
Reserved area*1 Normal memory Byte-selection SRAM SDRAM
H'10000000 to H'13FFFFFF H'14000000 to H'17FFFFFF
Area 4 Area 5*2
Normal memory Byte-selection SRAM Normal memory Byte-selection SRAM PCMCIA
64 Mbytes 64 Mbytes
Rev. 6.00 Jul. 15, 2009 Page 113 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Physical Address H'18000000 to H'1BFFFFFF
Area Area 6*
2
Memory to be Connected Normal memory Byte-selection SRAM PCMCIA
Capacity 64 Mbytes
H'1C000000 to H'1FFFFFFF
Area 7
Reserved area*1
64 Mbytes
Notes: 1. Do not access the reserved area. If the reserved area is accessed, the correct operation cannot be guaranteed. 2. For area 5, CS5BBCR and CS5BWCR are enabled. For area 6, CS6BBCR and CS6BWCR are enabled.
7.3.4
Area 0 Memory Type and Memory Bus Width
The memory bus width in this LSI can be set for each area. In area 0, the bus width is selected from 8 bits and 16 bits at a power-on reset by the external pin setting. The bus width of other areas is set by the register. The correspondence between the memory type, external pin (MD3), and bus width is listed in table 7.4. Table 7.4
MD3 1 0
Correspondence between External Pin (MD3), Memory Type, and Bus Width for CS0
Memory Type Normal memory Bus Width 8 bits 16 bits
7.3.5
Data Alignment
This LSI supports the big endian and little endian methods of data alignment. The data alignment is specified using the external pin (MD5) at a power-on reset as shown in table 7.5. Table 7.5
MD5 0 1
Correspondence between External Pin (MD5) and Endians
Endian Big endian Little endian
Rev. 6.00 Jul. 15, 2009 Page 114 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.4
Register Descriptions
The BSC has the following registers. For the addresses and access size for these registers, see section 24, List of Registers. Do not access spaces other than CS0 until setting the memory interfaces is complete. * * * * * * * * * * * * * * * Common control register (CMNCR) CS0 space bus control register for area 0 (CS0BCR) CS3 space bus control register for area 3 (CS3BCR) CS4 space bus control register for area 4 (CS4BCR) CS5B space bus control register for area 5B (CS5BBCR) CS6B space bus control register for area 6B (CS6BBCR) CS0 space wait control register for area 0 (CS0WCR) CS3 space wait control register for area 3 (CS3WCR) CS4 space wait control register for area 4 (CS4WCR) CS5B space wait control register for area 5B (CS5BWCR) CS6B space wait control register for area 6B (CS6BWCR) SDRAM control register (SDCR) Refresh timer control/status register (RTCSR) Refresh timer counter (RTCNT) Refresh time constant register (RTCOR)
Rev. 6.00 Jul. 15, 2009 Page 115 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.4.1
Common Control Register (CMNCR)
CMNCR is a 32-bit register that controls the common items for each area. Do not access external memory other than area 0 until setting CMNCR is complete.
Bit 31 to 13 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 12 MAP 0 R/W Space Specification Selects the address map for the external address space. The address maps to be selected are shown in tables 7.2 and 7.3. 0: Selects address map 1 1: Selects address map 2 11 to 5 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 4 1 R Reserved This bit is always read as 1. The write value should always be 1. 3 ENDIAN 0/1* R Endian Flag Fetches the external pin (MD5) state for specifying endian at a power-on reset. The endian setting for all the address spaces are set by this bit. This is a read-only bit. 0: External pin (MD5) for specifying endian was driven low at a power-on reset. This LSI is operated as big endian. 1: External pin (MD5) for specifying endian was driven high at a power-on reset. This LSI is being operated as little endian. 2 1 R Reserved This bit is always read as 1. The write value should always be 1.
Rev. 6.00 Jul. 15, 2009 Page 116 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 1
Bit Name HIZMEM
Initial Value 0
R/W R/W
Description Hi-Z Memory Control Specifies the pin state in standby mode for pins A25 to A0, BS, CSn, RD/WR, WEn (BEn)/DQMxx, and RD. 0: High impedance in standby mode 1: Driven in standby mode
0
HIZCNT
0
R/W
Hi-Z Control Specifies the pin state in standby mode for the CKIO, CKE, RAS, and CAS pins. 0: High impedance in standby mode 1: Driven in standby mode
Note:
*
The external pin (MD5) state for specifying endian is sampled at a power-on reset. When big endian is specified, this bit is read as 0 and when little endian is specified, this bit is read as 1.
7.4.2
CSn Space Bus Control Register (CSnBCR) (n = 0, 2, 3, 4, 5B, 6B)
CSnBCR specifies the type of memory connected to each space, data-bus width of each space, and the number of wait cycles between access cycles. Do not access external memory other than area 0 until setting CSnBCR is completed.
Bit 31, 30 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 29 28 IWW1 IWW0 1 1 R/W R/W Idle Cycles between Write-Read Cycles and Write-Write Cycles Specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. The write and read cycles or write and write cycles performed consecutively are the target cycle. 000: No idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
Rev. 6.00 Jul. 15, 2009 Page 117 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 27
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
26 25
IWRWD1 IWRWD0
1 1
R/W R/W
Idle Cycles for Another Space Read-Write Specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. The read and write cycles which are performed consecutively and are accessed to different areas are the target cycle. 000: No idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
24
0
R
Reserved This bit is always read as 0. The write value should always be 0.
23 22
IWRWS1 IWRWS0
1 1
R/W R/W
Idle Cycles for Read-Write in Same Space Specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. The read and write cycles which are performed consecutively and are accessed to the same area are the target cycle. 000: No idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
21
0
R
Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 118 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 20 19
Bit Name IWRRD1 IWRRD0
Initial Value 1 1
R/W R/W R/W
Description Idle Cycles for Read-Read in Another Space Specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. The read and read cycles which are performed consecutively and are accessed to different areas are the target cycle. 000: No idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
18
0
R
Reserved This bit is always read as 0. The write value should always be 0.
17 16
IWRRS1 IWRRS0
1 1
R/W R/W
Idle Cycles for Read-Read in Same Space Specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. The read and read cycles which are performed consecutively and are accessed to the same area are the target cycle. 000: No idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
Rev. 6.00 Jul. 15, 2009 Page 119 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 15 14 13 12
Bit Name TYPE3 TYPE2 TYPE1 TYPE0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Memory Type Specify the type of memory connected to the area. 0000: Normal space 0001: Reserved (setting prohibited) 0010: Reserved (setting prohibited) 0011: Byte-selection SRAM 0100: SDRAM 0101: PCMCIA 0110: Reserved (setting prohibited) 0111: Reserved (setting prohibited) 1000: Reserved (setting prohibited) 1001: Reserved (setting prohibited) 1010: Reserved (setting prohibited) 1011: Reserved (setting prohibited) 1100: Reserved (setting prohibited) 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited) For details on memory type in each area, see tables 7.2 and 7.3. Reserved This bit is always read as 0. The write value should always be 0.
11
0
R
Rev. 6.00 Jul. 15, 2009 Page 120 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9
Bit Name BSZ1 BSZ0
Initial Value 1* 1*
R/W R/W R/W
Description Data Bus Size Specify the data bus width of each area. 00: Reserved (setting prohibited) 01: 8 bits 10: 16 bits 11: 32 bits Notes: 1. The data bus width for area 0 is specified by the external pin. These bits are ignored. 2. When area 5 or 6 is specified as PCMCIA space, the bus width can be specified as either 8 bits or 16 bits. 3. If area 3 is specified as SDRAM space, the bus width cannot be specified as 8 bits. 4. These bits must be specified to either 01 or 11 before accessing to memory in other than area 0.
8 to 0
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
Note:
*
CS0BCR fetches the external pin state (MD3) that specify the bus width at a power-on reset.
Rev. 6.00 Jul. 15, 2009 Page 121 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.4.3
CSn Space Wait Control Register (CSnWCR) (n = 0, 3, 4, 5B, 6B)
CSnWCR specifies various wait cycles for memory accesses. The bit configuration of this register varies as shown below according to the memory type (TYPE3, TYPE2, TYPE1, or TYPE0) specified by the CSn space bus control register (CSnBCR). Specify CSnWCR before accessing the target area. Specify CSnBCR first, then specify CSnWCR. Normal Space, Byte-Selection SRAM: * CS0WCR
Bit 31 to 13 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 12 11 SW1 SW0 0 0 R/W R/W Number of Delay Cycles from Address, CSn Assertion to RD, WEn (BEn) Assertion Specify the number of delay cycles from address and CSn assertion to RD and WEn (BEn) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 122 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9 8 7
Bit Name WR3 WR2 WR1 WR0
Initial Value 1 0 1 0
R/W R/W R/W R/W R/W
Description Number of Access Wait Cycles Specify the number of wait cycles that are necessary for read or write access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited) External Wait Mask Specification Specifies whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycle is 0. 0: External wait is valid 1: External wait is ignored
6
WM
0
R/W
5 to 2
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
1 0
HW1 HW0
0 0
R/W R/W
Number of Delay Cycles from RD, WEn (BEn) negation to Address, CSn negation Specify the number of delay cycles from RD and WEn (BEn) negation to address and CSn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 123 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
* CS3WCR
Bit 31 to 21 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 20 BAS 0 R/W Byte Access Selection for Byte-Selection SRAM Specifies the WEn (BEn) and RD/WR signal timing when the byte-selection SRAM interface is used. 0: Asserts the WEn (BEn) signal at the read/write timing (signal used as strobe) and asserts the RD/WR signal during the write access cycle (signal used as status) 1: Asserts the WEn (BEn) signal during the read/write access cycle (used as status) and asserts the RD/WR signal at the write timing (used as strobe) 19 to 11 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 10 9 8 7 WR3 WR2 WR1 WR0 1 0 1 0 R/W R/W R/W R/W Number of Access Wait Cycles Specify the number of wait cycles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited)
Rev. 6.00 Jul. 15, 2009 Page 124 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 6
Bit Name WM
Initial Value 0
R/W R/W
Description External Wait Mask Specification Specify whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycle is 0. 0: External wait is valid 1: External wait is ignored
5 to 0
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
* CS4WCR
Bit 31 to 21 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 20 BAS 0 R/W Byte Access Selection for Byte-Selection SRAM Specifies the WEn (BEn) and RD/WR signal timing when the byte-selection SRAM interface is used. 0: Asserts the WEn (BEn) signal at the read/write timing (signal used as strobe) and asserts the RD/WR signal during the write access cycle (signal used as status) 1: Asserts the WEn (BEn) signal during the read/write access cycle (signal used as status)and asserts the RD/WR signal at the write timing (signal used as strobe) 19 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 125 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 18 17 16
Bit Name WW2 WW1 WW0
Initial Value 0 0 0
R/W R/W R/W R/W
Description Number of Write Access Wait Cycles Specify the number of cycles that are necessary for write access. 000: Same number of cycles as WR3 to WR0 setting (read access wait) 001: 0 cycle 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles
15 to 13
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
12 11
SW1 SW0
0 0
R/W R/W
Number of Delay Cycles from Address, CSn Assertion to RD, WEn (BEn) Assertion Specify the number of delay cycles from address and CSn assertion to RD and WEn (BEn) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 126 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9 8 7
Bit Name WR3 WR2 WR1 WR0
Initial Value 1 0 1 0
R/W R/W R/W R/W R/W
Description Number of Access Wait Cycles Specify the number of wait cycles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited) External Wait Mask Specification Specifies whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycles is 0. 0: External wait is valid 1: External wait is ignored
6
WM
0
R/W
5 to 2
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
1 0
HW1 HW0
0 0
R/W R/W
Number of Delay Cycles from RD, WEn (BEn) negation to Address, CSn negation Specify the number of delay cycles from RD and WEn (BEn) negation to address and CSn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 127 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
* CS5BWCR
Bit 31 to 19 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 18 17 16 WW2 WW1 WW0 0 0 0 R/W R/W R/W Number of Write Access Wait Cycles Specify the number of cycles that are necessary for write access. 000: Same number of cycles as WR3 to WR0 setting (read access wait) 001: 0 cycle 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles 15 to 13 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 12 11 SW1 SW0 0 0 R/W R/W Number of Delay Cycles from Address, CSn Assertion to RD, WEn (BEn) Assertion Specify the number of delay cycles from address and CSn assertion to RD and WEn (BEn) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 128 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9 8 7
Bit Name WR3 WR2 WR1 WR0
Initial Value 1 0 1 0
R/W R/W R/W R/W R/W
Description Number of Access Wait Cycles Specify the number of wait cycles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited) External Wait Mask Specification Specify whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycle is 0. 0: External wait is valid 1: External wait is ignored
6
WM
0
R/W
5 to 2
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
1 0
HW1 HW0
0 0
R/W R/W
Number of Delay Cycles from RD, WEn (BEn) negation to Address, CSn negation Specify the number of delay cycles from RD and WEn (BEn) negation to address and CSn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 129 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
* CS6BWCR
Bit 31 to 21 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 20 BAS 0 R/W Byte Access Selection for Byte-Selection SRAM Specifies the WEn (BEn) and RD/WR signal timing when the byte-selection SRAM interface is used. 0: Asserts the WEn (BEn) signal at the read/write timing (signal used as strobe) and asserts the RD/WR signal during the write access cycle (signal used as status) 1: Asserts the WEn (BEn) signal during the read/write access cycle (used as status) and asserts the RD/WR signal at the write timing (used as strobe) 19 to 13 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 12 11 SW1 SW0 0 0 R/W R/W Number of Delay Cycles from Address, CSn Assertion to RD, WEn (BEn) Assertion Specify the number of delay cycles from address and CSn assertion to RD and WEn (BEn) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 130 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9 8 7
Bit Name WR3 WR2 WR1 WR0
Initial Value 1 0 1 0
R/W R/W R/W R/W R/W
Description Number of Access Wait Cycles Specify the number of wait cycles that are necessary for read or write access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited) External Wait Mask Specification Specifies whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycle is 0. 0: External wait is valid 1: External wait is ignored
6
WM
0
R/W
5 to 2
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
1 0
HW1 HW0
0 0
R/W R/W
Number of Delay Cycles from RD, WEn (BEn) negation to Address, CSn negation Specify the number of delay cycles from RD and WEn (BEn) negation to address and CSn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 131 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
SDRAM: * CS3WCR
Bit 31 to 15 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 14 13 WTRP1 WTRP0 0 0 R/W R/W Wait Cycle Number for Precharge Completion Specify the number of minimum wait cycles inserted to wait for the completion of precharge in the following cases. * * * * From the start of auto-precharge to the issuing of the ACTV command for the same bank. From the issuing of the PRE/PALL command to the issuing of the ACTV command for the same bank. From the issuing of the PALL command during autorefreshing to the issuing of the REF command. From the issuing of the PALL command during selfrefreshing to the issuing of the SELF command. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles 12 0 R Reserved This bit is always read as 0. The write value should always be 0. 11 10 WTRCD1 WTRCD0 0 1 R/W R/W Wait Cycle Number from ACTV Command to READ(A)/WRIT(A) Command Specify the number of minimum wait cycles from issuing the ACTV command to issuing the READ(A)/WRIT(A) command. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles
Rev. 6.00 Jul. 15, 2009 Page 132 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 9
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
8 7
A3CL1 A3CL0
1 0
R/W R/W
CAS Latency for Area 3. Specify the CAS latency for area 3. 00: 1 cycle 01: 2 cycles 10: 3 cycles 11: Reserved (setting prohibited)
6, 5
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
4 3
TRWL1 TRWL0
0 0
R/W R/W
Wait Cycle Number for Precharge Start Wait Specify the number of minimum wait cycles inserted to wait for the start of precharge in the following cases. * From the issuing of the WRITA command by this LSI to the start of the auto-precharge in the SDRAM. The ACTV command for the same bank is issued after issuing the WRITA command in non-bank active mode. To confirm how many cycles should be needed in the SDRAM between receiving the WRITA command and the auto-precharge start, refer to the data sheets for each SDRAM. Set this bit so that the cycle number in that data sheets should not exceed the cycle number set by this bit. * From the issuing of the WRIT command by this LSI to the issuing of the PRE command. A different row address in the same bank is accessed in bank active mode. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles
Rev. 6.00 Jul. 15, 2009 Page 133 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 2
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
1 0
WTRC1 WTRC0
0 0
R/W R/W
Idle Cycle Number from REF Command/Self-Refreshing Release to ACTV/REF/MRS Command Specify the number of minimum idle cycles in the following cases. * * From the issuing of the REF command to the issuing of the ACTV/REF/MRS command. From the self-refreshing release to the issuing of the ACTV/REF/MRS command. 00: 2 cycles 01: 3 cycles 10: 5 cycles 11: 8 cycles
PCMCIA: * CS5BWCR, CS6BWCR
Bit 31 to 22 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 21 20 SA1 SA0 0 0 R/W R/W Space Attribute Specification Specify memory card interface or I/O card interface when the PCMCIA interface is selected. * SA1 0: Specifies memory card interface when A25 = 1 1: Specifies I/O card interface when A25 = 1 * SA0 0: Specifies memory card interface when A25 = 0 1: Specifies I/O card interface when A25 = 0
Rev. 6.00 Jul. 15, 2009 Page 134 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 19 to 15
Bit Name
Initial Value All 0
R/W R
Description Reserved These bits are always read as 0. The write value should always be 0.
14 13 12 11
TED3 TED2 TED1 TED0
0 0 0 0
R/W R/W R/W R/W
Delay from Address to RD or WE Assert Specify the delay time from address output to RD or WE assertion in PCMCIA interface. 0000: 0.5 cycles 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: Reserved (setting prohibited) 1001: Reserved (setting prohibited) 1010: Reserved (setting prohibited) 1011: Reserved (setting prohibited) 1100: Reserved (setting prohibited) 1101: Reserved (setting prohibited) 1110: Reserved (setting prohibited) 1111: Reserved (setting prohibited)
Rev. 6.00 Jul. 15, 2009 Page 135 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 10 9 8 7
Bit Name PCW3 PCW2 PCW1 PCW0
Initial Value 1 0 1 0
R/W R/W R/W R/W R/W
Description Number of Access Wait Cycles Specify the number of wait cycles to be inserted. 0000: 3 cycles 0001: 6 cycles 0010: 9 cycles 0011: 12 cycles 0100: 15 cycles 0101: 18 cycles 0110: 22 cycles 0111: 26 cycles 1000: 30 cycles 1001: 33 cycles 1010: 36 cycles 1011: 38 cycles 1100: 52 cycles 1101: 60 cycles 1110: 64 cycles 1111: 80 cycles External Wait Mask Specification Specify whether or not the external wait input is valid. The specification by this bit is valid even when the number of access wait cycle is 0. 0: External wait is valid 1: External wait is ignored
6
WM
0
R/W
5, 4
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 136 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 3 2 1 0
Bit Name TEH3 TEH2 TEH1 TEH0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Delay from RD or WE Negate to Address Specify the address hold time from RD or WE negation in the PCMCIA interface. 0000: 0.5 cycle 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: 8.5 cycles 1001: 9.5 cycles 1010: 10.5 cycles 1011: 11.5 cycles 1100: 12.5 cycles 1101: 13.5 cycles 1110: 14.5 cycles 1111: 15.5 cycles
Rev. 6.00 Jul. 15, 2009 Page 137 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.4.4
SDRAM Control Register (SDCR)
SDCR specifies the method to refresh and access SDRAM, and the types of SDRAMs to be connected.
Bit 31 to 12 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 11 RFSH 0 R/W Refresh Control Specifies whether or not the refreshing SDRAM is performed. 0: Refreshing is not performed 1: Refreshing is performed 10 RMODE 0 R/W Refresh Control Specifies whether to perform auto-refreshing or selfrefreshing when the RFSH bit is 1. When the RFSH bit is 1 and this bit is 1, self-refreshing starts immediately. When the RFSH bit is 1 and this bit is 0, auto-refreshing starts according to the contents that are set in RTCSR, RTCNT, and RTCOR. 0: Auto-refreshing is performed 1: Self-refreshing is performed 9 0 R Reserved This bit is always read as 0. The write value should always be 0. 8 BACTV 0 R/W Bank Active Mode Specifies whether to access in auto-precharge mode (using READA and WRITA commands) or in bank active mode (using READ and WRIT commands). 0: Auto-precharge mode (using READA and WRITA commands) 1: Bank active mode (using READ and WRIT commands) 7 to 5 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 138 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 4 3
Bit Name A3ROW1 A3ROW0
Initial Value 0 0
R/W R/W R/W
Description Number of Bits of Row Address for Area 3 Specify the number of bits of the row address for area 3. 00: 11 bits 01: 12 bits 10: 13 bits 11: Reserved (setting prohibited)
2
0
R
Reserved This bit is always read as 0. The write value should always be 0.
1 0
A3COL1 A3COL0
0 0
R/W R/W
Number of Bits of Column Address for Area 3 Specify the number of bits of the column address for area 3. 00: 8 bits 01: 9 bits 10: 10 bits 11: Reserved (setting prohibited)
7.4.5
Refresh Timer Control/Status Register (RTCSR)
RTCSR specifies various items about refresh for SDRAM. When RTCSR is written to, the upper 16 bits of the write data must be H'A55A to cancel write protection.
Bit 31 to 8 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 139 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 7
Bit Name CMF
Initial Value 0
R/W R/W
Description Compare Match Flag Indicates that a compare match occurs between the refresh timer counter (RTCNT) and refresh time constant register (RTCOR). [Clearing condition] When 0 is written to this bit after reading RTCSR with CMF = 1. [Setting condition] When RTCNT value matches RTCOR value
6
0
R
Reserved This bit is always read as 0. The write value should always be 0.
5 4 3
CKS2 CKS1 CKS0
0 0 0
R/W R/W R/W
Clock Select Select the clock input to count-up the refresh timer counter (RTCNT). 000: Stop the counting-up 001: B/4 010: B/16 011: B/64 100: B/256 101: B/1024 110: B/2048 111: B/4096
Rev. 6.00 Jul. 15, 2009 Page 140 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Bit 2 1 0
Bit Name RRC2 RRC1 RRC0
Initial Value 0 0 0
R/W R/W R/W R/W
Description Refresh Count Specify the number of consecutive refresh cycles, when the refresh request occurs after the coincidence of the values of the refresh timer counter (RTCNT) and the refresh time constant register (RTCOR). Using consecutive refresh cycles can prolong cycles between refreshing. 000: Once 001: Twice 010: 4 times 011: 6 times 100: 8 times 101: Reserved (setting prohibited) 110: Reserved (setting prohibited) 111: Reserved (setting prohibited)
7.4.6
Refresh Timer Counter (RTCNT)
RTCNT is an 8-bit counter that increments using the clock selected by bits CKS2 to CKS0 in RTCSR. When RTCNT matches RTCOR, RTCNT is cleared to 0. The value in RTCNT returns to 0 after counting up to 255. When RTCNT is written to, the upper 16 bits of the write data must be H'A55A to cancel write protection.
Bit 31 to 8 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 to 0 All 0 R/W 8-bit Counter
Rev. 6.00 Jul. 15, 2009 Page 141 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.4.7
Refresh Time Constant Register (RTCOR)
RTCOR is an 8-bit register. When RTCOR matches RTCNT, the CMF bit in RTCSR is set to 1 and RTCNT is cleared to 0. When the RFSH bit in SDCR is 1, a memory refresh request is issued. The request is maintained until the refresh operation is performed. If the request is not processed when the next matching occurs, the previous request is ignored. When the RTCOR is written to, the upper 16 bits of the write data must be H'A55A to cancel write protection.
Bit 31 to 8 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 to 0 All 0 R/W 8-bit Counter
Rev. 6.00 Jul. 15, 2009 Page 142 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.5
7.5.1
Operation
Endian/Access Size and Data Alignment
This LSI supports big endian, in which the most significant byte (MSByte) of multiple byte data is stored in the lower address, and little endian, in which the least significant byte (LSByte) of multiple byte data is stored in the lower address. Endian is specified at a power-on reset by the external pin (MD5). When pin MD5 is driven low at a power-on reset, the endian will become big endian and when pin MD5 is driven high at a power-on reset, the endian will become little endian. Three data bus widths (8, 16, and 32 bits) are available for normal memory and byte-selection SRAM. Two data bus widths (16 and 32 bits) are available for SDRAM. Two data bus widths (8 and 16 bits) are available for PCMCIA interface. Data alignment is performed in accordance with the data bus width of the device and endian. This also means that when longword data is read from a byte-width device, the read operation must be done four times. In this LSI, data alignment and conversion of data length is performed automatically between the respective interfaces. Tables 7.6 to 7.11 show the relationship between endian, device data width, and access unit. Table 7.6 32-Bit External Device/Big Endian Access and Data Alignment
Data Bus Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0 Word access at 2 Longword access at 0 Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0), D31 to D24 D23 to D16 D15 to D8 D7 to D0 DQMUU DQMUL DQMLU DQMLL
Data 7 to 0 Data 15 to 8 Data 31 to 24
Data 7 to 0 Data 7 to 0 Data 23 to 16
Data 7 to 0 Data 15 to 8 Data 15 to 8
Data 7 to 0 Data 7 to 0 Data 7 to 0
Assert Assert Assert
Assert Assert Assert
Assert Assert Assert
Assert Assert Assert
Rev. 6.00 Jul. 15, 2009 Page 143 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.7
16-Bit External Device/Big Endian Access and Data Alignment
Data Bus Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0),
Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0 Word access at 2 Longword access at 0
D31 to D24 D23 to D16 D15 to D8 D7 to D0
DQMUU
DQMUL
DQMLU
DQMLL


Data 7 to 0 Data 7 to 0 Data 15 to 8 Data 15 to 8 Data 31 to 24 Data 15 to 8
Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 15 to 8 Data 23 to 16 Data 7 to 0


Assert Assert Assert Assert Assert Assert
Assert Assert Assert Assert Assert Assert
1st time at 0 2nd time at 2
Rev. 6.00 Jul. 15, 2009 Page 144 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.8
8-Bit External Device/Big Endian Access and Data Alignment
Data Bus Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0),
Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0
D31 to D24 D23 to D16 D15 to D8 D7 to D0
DQMUU
DQMUL
DQMLU
DQMLL



Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 15 to 8 Data 7 to 0 Data 15 to 8 Data 7 to 0 Data 31 to 24 Data 23 to 16 Data 15 to 8 Data 7 to 0



Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert
1st time at 0 2nd time at 1
Word access at 2
1st time at 2 2nd time at 3
Longword access at 0
1st time at 0 2nd time at 1 3rd time at 2 4th time at 3
Rev. 6.00 Jul. 15, 2009 Page 145 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.9
32-Bit External Device/Big Endian Access and Data Alignment
Data Bus Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0),
Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0 Word access at 2 Longword access at 0
D31 to D24 D23 to D16 D15 to D8 D7 to D0
DQMUU
DQMUL
DQMLU
DQMLL
Data 7 to 0 Data 15 to 8 Data 31 to 24
Data 7 to 0 Data 7 to 0 Data 23 to 16
Data 7 to 0 Data 15 to 8 Data 15 to 8
Data 7 to 0 Data 7 to 0 Data 7 to 0
Assert Assert Assert
Assert Assert Assert
Assert Assert Assert
Assert Assert Assert
Rev. 6.00 Jul. 15, 2009 Page 146 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.10 16-Bit External Device/Little Endian Access and Data Alignment
Data Bus Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0 Word access at 2 Longword access at 0 Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0), D31 to D24 D23 to D16 D15 to D8 D7 to D0 DQMUU DQMUL DQMLU DQMLL


Data 7 to 0 Data 7 to 0 Data 15 to 8 Data 15 to 8 Data 15 to 8 Data 31 to 24
Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 23 to 16


Assert Assert Assert Assert Assert Assert
Assert Assert Assert Assert Assert Assert
1st time at 0 2nd time at 2
Rev. 6.00 Jul. 15, 2009 Page 147 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.11 8-Bit External Device/Little Endian Access and Data Alignment
Data Bus Operation Byte access at 0 Byte access at 1 Byte access at 2 Byte access at 3 Word access at 0 Strobe Signals
WE3(BE3), WE2(BE2), WE1(BE1), WE0(BE0), D31 to D24 D23 to D16 D15 to D8 D7 to D0 DQMUU DQMUL DQMLU DQMLL



Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 7 to 0 Data 15 to 8 Data 7 to 0 Data 15 to 8 Data 7 to 0 Data 15 to 8 Data 23 to 16 Data 31 to 24



Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert Assert
1st time at 0 2nd time at 1
Word access at 2
1st time at 2 2nd time at 3
Longword access at 0
1st time at 0 2nd time at 1 3rd time at 2 4th time at 3
Rev. 6.00 Jul. 15, 2009 Page 148 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.5.2
Normal Space Interface
Basic Timing: For access to a normal space, this LSI uses strobe signal output in consideration of the fact that mainly static RAM will be directly connected. When using SRAM with a byteselection pin, see section 7.5.6, Byte-Selection SRAM Interface. Figure 7.3 shows the basic timings of normal space access. A no-wait normal access is completed in two cycles. The BS signal is asserted for one cycle to indicate the start of a bus cycle.
T1 CKIO T2
A
CSn
RD/WR
Read
RD D
RD/WR
WEn(BEn) Write D
BS
Figure 7.3 Normal Space Basic Access Timing (No-Wait Access) There is no output signal which informs external devices of the access size when reading. Although the least significant bit of the address indicates the correct address when the access starts, 16-bit data is always read from a 16-bit device. When writing, only the WEn (BEn) signal for the byte to be written to is asserted. When buffers are placed on the data bus, the RD signal should be used to control the buffers. The RD/WR signal indicates the same state as a read cycle (driven high) when no access has been
Rev. 6.00 Jul. 15, 2009 Page 149 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
carried out. Therefore, care must be taken when controlling the buffers with the RD/WR signal, to avoid data conflict. Figures 7.4 and 7.5 show the basic timings of normal space consecutive access. If the WM bit in CSnWCR is cleared to 0, a Tnop cycle is inserted to check the external wait (figure 7.4). If the WM bit in CSnWCR is set to 1, an external wait request is ignored and no Tnop cycle is inserted (figure 7.5).
T1 CKIO T2 Tnop T1 T2
A25 to A0
CSn
RD/WR
RD Read D
WEn(BEn) Write D
BS
WAIT
Figure 7.4 Consecutive Access to Normal Space (1): Bus Width = 16 bits, Longword Access, CSnWCR.WM = 0 (Access Wait = 0, Cycle Wait = 0)
Rev. 6.00 Jul. 15, 2009 Page 150 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
T1
T2
T1
T2
CKIO
A25 to A0
CSn
RD/WR
RD Read D WEn(BEn) Write D
BS
WAIT
Figure 7.5 Consecutive Access to Normal Space (2): Bus Width = 16 bits, Longword Access, CSnWCR.WM = 1 (Access Wait = 0, Cycle Wait = 0)
Rev. 6.00 Jul. 15, 2009 Page 151 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
This LSI A18
....
128 kwords x 8 bits SRAM A16
....
A2 CSn RD D31
....
A0 CS OE I/O7
....
D24 WE3(BE3) D23 D16 WE2(BE2) D15 D8 WE1(BE1) D7
.... .... ....
I/O0 WE
A16
....
A0 CS OE I/O7
....
D0 WE0(BE0)
I/O0 WE
A16
....
A0 CS OE I/O7
....
I/O0 WE
A16
....
A0 CS OE I/O7
....
I/O0 WE
Figure 7.6 Example of 32-Bit Data-Width SRAM Connection
Rev. 6.00 Jul. 15, 2009 Page 152 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
This LSI
**** ****
128 kwords x 8 bits SRAM
**** **** **** ****
A17 A1 CSn RD D15
****
A16 A0 CS OE I/O7 I/O0 WE
****
****
D0 WE0(BE0)
****
D8 WE1(BE1) D7
****
****
****
A16 A0 CS OE I/O7 I/O0 WE
Figure 7.7 Example of 16-Bit Data-Width SRAM Connection
128 kwords x 8 bits SRAM A16
This LSI A16
...
...
****
A0 CSn RD D7 D0 WE0(BE0)
A0 CS OE I/O7
...
...
I/O0 WE
Figure 7.8 Example of 8-Bit Data-Width SRAM Connection
Rev. 6.00 Jul. 15, 2009 Page 153 of 816 REJ09B0237-0600
...
...
Section 7 Bus State Controller (BSC)
7.5.3
Access Wait Control
Wait cycle insertion on a normal space access can be controlled by the settings of bits WR3 to WR0 in CSnWCR. It is possible for areas 4, 5A, and 5B to insert wait cycles independently in read access and in write access. The areas other than 4, 5A, and 5B have the same access wait for read cycle and write cycle. The specified number of Tw cycles is inserted as wait cycles in a normal space access shown in figure 7.9.
T1 Tw T2
CKIO A25 to A0 CSn RD/WR RD Read D WEn(BEn) Write D BS
Figure 7.9 Wait Timing for Normal Space Access (Software Wait Only) When the WM bit in CSnWCR is cleared to 0, the external wait signal (WAIT) is also sampled. The WAIT pin sampling is shown in figure 7.10. In this example, two wait cycles are inserted as software wait. The WAIT signal is sampled at the falling edge of the CKIO signal in the cycle immediately before the T2 cycle (T1 or Tw cycle).
Rev. 6.00 Jul. 15, 2009 Page 154 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
T1 CKIO A25 to A0 CSn RD/WR RD Read D WEn(BEn) Write D WAIT BS
Tw
Tw
Wait cycles inserted by WAIT signal Twx T2
Figure 7.10 Wait Cycle Timing for Normal Space Access (Wait cycle Insertion using WAIT)
Rev. 6.00 Jul. 15, 2009 Page 155 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.5.4
Extension of Chip Select (CSn) Assertion Period
The number of cycles from CSn assertion to RD and WEn (BEn) assertion can be specified by setting bits SW1 and SW0 in CSnWCR. The number of cycles from RD and WEn (BEn) negation to CSn negation can be specified by setting bits HW1 and HW0. Therefore, a flexible interface to an external device can be obtained. Figure 7.11 shows an example. A Th cycle and a Tf cycle are added before and after a normal cycle, respectively. In these cycles, RD and WEn (BEn) are not asserted, while other signals are asserted. The data output is prolonged to the Tf cycle, and this prolongation is useful for devices with slow writing operations.
Th T1 T2 Tf
CKIO A25 to A0 CSn RD/WR RD Read D WEn(BEn) Write D BS
Figure 7.11 Example of Timing when CSn Assertion Period is Extended
Rev. 6.00 Jul. 15, 2009 Page 156 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.5.5
SDRAM Interface
SDRAM Direct Connection: The SDRAM that can be connected to this LSI is a product that has 11/12/13 bits of row address, 8/9/10 bits of column address, 4 or less banks, and uses the A10 pin for setting precharge mode in read and write command cycles. The control signals for direct connection of SDRAM are RAS, CAS, RD/WR, DQMUU, DQMUL, DQMLU, DQMLL, CKE, and CS3. Signals other than CKE are valid when CS3 is asserted. SDRAM can be connected to area 2. The data bus width of the area that is connected to SDRAM can be set to 16 bits or 32 bits. Burst read/single write (burst length 1) and burst read/burst write (burst length 1) are supported as the SDRAM operating mode. Commands for SDRAM can be specified by RAS, CAS, RD/WR, and specific address signals. These commands are shown below. * * * * * * * * * * * NOP Auto-refreshing (REF) Self-refreshing (SELF) All banks precharge (PALL) Specified bank precharge (PRE) Bank active (ACTV) Read (READ) Read with precharge (READA) Write (WRIT) Write with precharge (WRITA) Write mode register (MRS)
The byte to be accessed is specified by DQMUU, DQMUL, DQMLU and DQMLL. Reading or writing is performed for a byte whose corresponding DQMxx is low. For details on the relationship between DQMxx and the byte to be accessed, refer to section 7.5.1, Endian/Access Size and Data Alignment.
Rev. 6.00 Jul. 15, 2009 Page 157 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Figures 7.12 and 7.13 show an example of the connection of the SDRAM with the LSI.
64-Mbit SDRAM (1 Mword x 16 bits x 4 banks)
A15 A13
This LSI
....
A2 CKE CKIO CSn
RAS CAS RD/WR D31
....
D16 DQMUU DQMUL D15
....
D0 DQMLU DQMLL
Figure 7.12 Example of 32-Bit Data-Width SDRAM Connection
Rev. 6.00 Jul. 15, 2009 Page 158 of 816 REJ09B0237-0600
....
I/O0 DQMU DQML
....
A0 CKE CLK CS RAS CAS WE I/O15
....
I/O0 DQMU DQML A13
....
A0 CKE CLK CS RAS CAS WE I/O15
Section 7 Bus State Controller (BSC)
This LSI
A14
64-Mbit SDRAM (1 Mword x 16 bits x 4 banks) A13 A0 CKE CLK CS
A1 CKE CKIO CSn
...
RAS CAS RD/WR D15
RAS CAS WE I/O15 I/O0 DQMU DQML
D0 DQMLU DQMLL
Figure 7.13 Example of 16-Bit Data-Width SDRAM Connection Address Multiplexing: An address multiplexing is specified so that SDRAM can be connected without external multiplexing circuitry according to the setting of bits BSZ1 and BSZ0 in CSnBCR, AnROW1 and AnROW0 and AnCOL1 AnCOL0 in SDCR. Tables 7.12 to 7.17 show the relationship between those settings and the bits output on the address pins. Do not specify those bits in the manner other than this table, otherwise the operation of this LSI is not guaranteed. A25 to A18 are not multiplexed and the original values of address are always output on these pins. When the data bus width is 16 bits (BSZ[1:0] = B'10), pin A0 of SDRAM specifies a word address. Therefore, connect this A0 pin of SDRAM to pin A1 of this LSI; pin A1 pin of SDRAM to pin A2 of this LSI, and so on. When the data bus width is 32 bits (BSZ[1:0] = B'11), pin A0 of SDRAM specifies a long word address. Therefore, connect this A0 pin of SDRAM to pin A2 of this LSI; pin A1 pin of SDRAM to pin A3 of this LSI, and so on.
...
Rev. 6.00 Jul. 15, 2009 Page 159 of 816 REJ09B0237-0600
...
...
Section 7 Bus State Controller (BSC)
Table 7.12 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (1)
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 00 (11 bits) A3 COL [1:0] 00 (8 bits) Output Column Address A17 A16 A15
23
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 00 (8 bits) Output Column Address A17 A16
2
Output Pins of Output Row This LSI Address A17 A16 A15 A14 A13 A12 A25 A24 A23 A22* * A21* A20
2
Pins of SDRAM
Function Unused
Output Pins of Output Row This LSI Address A17 A16 A15 A24 A23 A23* A22* A21 A20
Pins of SDRAM
Function Unused
A23* A22* A13 L/H*
2
A22* * A21* L/H*
2
23
A12 (BA1) Specifies bank A11 (BA0) A10/AP Specifies address/ precharge Address
A14 A13 A12
2
2
A13 (BA1) Specifies bank A12 (BA0) A11 Address Specifies address/ precharge Address
1
1
A10/AP
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2
A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2
A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Rev. 6.00 Jul. 15, 2009 Page 160 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 00 (11 bits) A3 COL [1:0] 00 (8 bits) Output Column Address A1 A0 Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 00 (8 bits) Output Column Address A1 A0
Output Pins of Output Row This Address LSI A1 A0 A9 A8
Pins of SDRAM
Function Unused
Output Pins of Output Row This Address LSI A1 A0 A9 A8
Pins of SDRAM
Function Unused
Example of memory connection One 64-Mbit product (512 kwords x 32 bits x 4 banks, 8bit column product) Two 16-Mbit products (512 kwords x 16 bits x 2 banks, 8bit column product)
Example of memory connection One 128-Mbit product (1 Mword x 32 bits x 4 banks, 8-bit column product) Two 64-Mbit product (1 Mword x 16 bits x 4 banks, 8-bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification 3. Applicable only to a 64-Mbit product
Table 7.13 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (2)
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 01 (9 bits) Output Column Address A17 A16
2
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 10 (10 bits) Output Column Address A17 A16
2
Output Pins of Output Row This Address LSI A17 A16 A15 A14 A26 A25 A24* A23*
Pins of SDRAM
Function Unused
Output Pins of Output Row This Address LSI A17 A16 A27 A26 A25* A24*
Pins of SDRAM
Function Unused
A24* A23*
2
2
2
A13 (BA1) Specifies bank A12 (BA0)
A15 A14
A25* A24*
2
2
2
A13 (BA1) Specifies bank A12 (BA0)
Rev. 6.00 Jul. 15, 2009 Page 161 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 01 (9 bits) Output Column Address A13 L/H*
1
Setting BSZ [1:0] 11 (32 bits) A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] 10 (10 bits) Output Column Address A13 L/H*
1
Output Pins of Output Row This Address LSI A13 A12 A22 A21
Pins of SDRAM A11 A10/AP
Function Address Specifies address/ precharge Address
Output Pins of Output Row This Address LSI A13 A12 A23 A22
Pins of SDRAM A11 A10/AP
Function Address Specifies address/ precharge Address
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2
A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Unused
A1 A0
Unused
Example of memory connection One 256-Mbit product (2 Mwords x 32 bits x 4 banks, 9bit column product) Two 128-Mbit products (2 Mwords x 16 bits x 4 banks, 9bit column product)
Example of memory connection One 512-Mbit product (4 Mwords x 32 bits x 4 banks, 10bit column product) Two 256-Mbit product (4 Mwords x 16 bits x 4 banks, 10bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification
Rev. 6.00 Jul. 15, 2009 Page 162 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.14 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (3)
Setting A3 ROW [1:0] 10 (13 bits) Output Row Address A26 A25* A24* A23 A22 A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9
2
BSZ [1:0] 11 (32 bits) Output Pins of This LSI A17 A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A3 COL [1:0] 01 (9 bits) Output Column Address A17 A25* A24* A14 A13 L/H* A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
1 2
Pins of SDRAM
Function Unused
A14 (BA1) A13 (BA0) A12 A11 A10/AP A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Specifies bank
2
2
Address
Specifies address/precharge Address
Unused
Example of memory connection One 512-Mbit product (4 Mwords x 32 bits x 4 banks, 9-bit column product) Two 256-Mbit products (4 Mwords x 16 bits x 4 banks, 9-bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification
Rev. 6.00 Jul. 15, 2009 Page 163 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.15 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (4)
Setting A3 ROW [1:0] 00 (11 bits) A3 COL [1:0] Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
00 (8 bits)
00 (8 bits)
Output Pins of Output This Row Address LSI A17 A16 A15 A14 A13 A12 A25 A24 A23 A22 A21 A20*
2
Output Column Address A17 A16 A15 A14 A21 A20*
2
Pins of SDRAM
Function Unused
Output Pins of Output This Row Address LSI A17 A16 A15 A14 A13 A25 A24 A23 A22* A21* A20
2
Output Column Address A17 A16 A15 A22* A21* A12
1 2
Pins of SDRAM
Function Unused
2
2
A13 (BA1) Specifies bank A12 (BA0) A11 Address
A11 (BA0) Specifies bank A10/AP Specifies address/ precharge Address
A12
A11
A19
L/H*
1
A11
A19
L/H*
A10/AP
Specifies address/ precharge Address
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1
A18 A17 A16 A15 A14 A13 A12 A11 A10 A9 A8
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Unused
A0
Unused
Rev. 6.00 Jul. 15, 2009 Page 164 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Setting A3 ROW [1:0] 00 (11 bits) A3 COL [1:0]
Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
00 (8 bits)
00 (8 bits)
Output Pins of Output Row This LSI Address
Output Column Address
Pins of SDRAM
Function
Output Pins of Output Row This LSI Address
Output Column Address
Pins of SDRAM
Function
Example of memory connection One 16-Mbit product (512 kwords x 16 bits x 2 banks, 8bit column product)
Example of memory connection One 64-Mbit products (1 Mword x 16 bits x 4 banks, 8-bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification
Table 7.16 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (5)
Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0] Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
01 (9 bits)
10 (10 bits)
Output Pins of Output This Row Address LSI A17 A16 A15 A14 A13 A12 A26 A25 A24 A23* A22* A21
2
Output Column Address A17 A16 A15 A23* A22* A12
2
Pins of SDRAM
Function Unused
Output Pins of Output This Row Address LSI A17 A16 A15 A27 A26 A25 A24* A23* A22
2
Output Column Address A17 A16 A15 A24* A23* A12
2
Pins of SDRAM
Function Unused
2
2
A13 (BA1) Specifies bank A12 (BA0) A11 Address
A14 A13 A12
2
2
A13 (BA1) Specifies bank A12 (BA0) A11 Address
Rev. 6.00 Jul. 15, 2009 Page 165 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0]
Setting A3 ROW [1:0] 01 (12 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
01 (9 bits)
10 (10 bits)
Output Pins of Output Row This LSI Address A11 A20
Output Column Address L/H*
1
Pins of SDRAM A10/AP
Function Specifies address/ precharge Address
Output Pins of Output Row This LSI Address A11 A21
Output Column Address L/H*
1
Pins of SDRAM A10/AP
Function Specifies address/ precharge Address
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1
A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Unused
A0
Unused
Example of memory connection One 128-Mbit product (2 Mwords x 16 bits x 4 banks, 9bit column product)
Example of memory connection One 256-Mbit product (4 Mwords x 16 bits x 4 banks, 10bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification
Rev. 6.00 Jul. 15, 2009 Page 166 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.17 Relationship between Register Settings (BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (6)
Setting A3 ROW [1:0] 10 (13 bits) A3 COL [1:0] Setting A3 ROW [1:0] 10 (13 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
01 (9 bits)
10 (10 bits)
Output Pins of Output This Row Address LSI A17 A16 A15 A14 A13 A12 A11 A26 A25 A24* A23* A22 A21 A20
2
Output Column Address A17 A16 A24* A23* A13 A12 L/H*
1 2
Pins of SDRAM
Function Unused
Output Pins of Output This Row Address LSI A17 A16 A27 A26 A25* A24* A23 A22 A21
2
Output Column Address A17 A16 A25* A24* A13 A12 L/H*
1 2
Pins of SDRAM
Function Unused
2
2
A14 (BA1) Specifies bank A13 (BA0) A12 A11 A10/AP Specifies address/ precharge Address Address
A15 A14 A13 A12 A11
2
2
A14 (BA1) Specifies bank A13 (BA0) A12 A11 A10/AP Specifies address/ precharge Address Address
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A9
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1
A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10
A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Unused
A0
Unused
Rev. 6.00 Jul. 15, 2009 Page 167 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Setting A3 ROW [1:0] 10 (13 bits) A3 COL [1:0]
Setting A3 ROW [1:0] 10 (13 bits) A3 COL [1:0]
BSZ [1:0] 10 (16 bits)
BSZ [1:0] 10 (16 bits)
01 (9 bits)
10 (10 bits)
Output Pins of Output Row This LSI Address
Output Column Address
Pins of SDRAM
Function
Output Pins of Output Row This LSI Address
Output Column Address
Pins of SDRAM
Function
Example of memory connection One 256-Mbit product (4 Mwords x 16 bits x 4 banks, 9bit column product)
Example of memory connection One 512-Mbit product (8 Mwords x 16 bits x 4 banks, 10bit column product)
Notes: 1. L/H is a bit used in the command specification; it is fixed low or high according to the access mode. 2. Bank address specification
Burst Read: A burst read occurs in the following cases with this LSI. 1. Access size in reading is larger than data bus width. 2. 16-byte transfer in cache miss. 3. 16-byte transfer by DMAC and E-DMAC (access to non-cacheable area) This LSI always accesses the SDRAM with burst length 1. For example, read access of burst length 1 is performed consecutively four times to read 16-byte consecutive data from the SDRAM that is connected to a 32-bit data bus. The number of bursts in this access is four.
Rev. 6.00 Jul. 15, 2009 Page 168 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.18 shows the relationship between the access size and the number of bursts. Table 7.18 Relationship between Access Size and Number of Bursts
Bus Width 16 bits Access Size 8 bits 16 bits 32 bits 16 bytes 32 bits 8 bits 16 bits 32 bits 16 bytes Number of Bursts 1 1 2 8 1 1 1 4
Figures 7.14 and 7.15 show timing charts in burst read. In burst read, the ACTV command is output in the Tr cycle, the READ command is issued in the Tc1, Tc2, and Tc3 cycles, the READA command is issued in the Tc4 cycle, and the read data is latched at the rising edge of the external clock (CKIO) in the Td1 to Td4 cycles. The Tap cycle is used to wait for the completion of an auto-precharge induced by the READ command in the SDRAM. In the Tap cycle, a new command will not be issued to the same bank. However, other banks can be accessed. The number of Tap cycles is specified by bits WTRP1 and WTRP0 in CS3WCR. In this LSI, wait cycles can be inserted by specifying bits in CSnWCR to connect the SDRAM with variable frequencies. Figure 7.15 shows an example in which wait cycles are inserted. The number of cycles from the Tr cycle where the ACTV command is output to the Tc1 cycle where the READA command is output can be specified using bits WTRCD1 and WTRCD0 in CS3WCR. When bits WTRCD1 and WTRCD0 is set to one cycle or more, a Trw cycle where the NOP command is issued is inserted between the Tr cycle and Tc1 cycle. The number of cycles from the Tc1 cycle where the READA command is output to the Td1 cycle where the read data is latched can be specified by bits A3CL1 and A3CL0 bits in CS3WCR in CS3WCR. This number of cycles corresponds to the synchronous DRAM CAS latency. The CAS latency for the synchronous DRAM is normally defined as up to three cycles. However, the CAS latency in this LSI can be specified as one to four cycles. This CAS latency can be achieved by connecting a latch circuit between this LSI and the synchronous DRAM.
Rev. 6.00 Jul. 15, 2009 Page 169 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tc1
Td1 Tc2
Td2 Tc3
Td3 Tc4
Td4 Tde Tap
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.14 Burst Read Basic Timing (Auto Precharge)
Rev. 6.00 Jul. 15, 2009 Page 170 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Trw
Tc1
Tw Tc2
Td1 Tc3
Td2 Tc4
Td3
Td4 Tde Tap
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.15 Burst Read Wait Specification Timing (Auto Precharge)
Rev. 6.00 Jul. 15, 2009 Page 171 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Single Read: A read access ends in one cycle when data exists in non-cacheable area and the data bus width is larger than or equal to access size. Since the burst length is set to 1 in synchronous DRAM burst read/single write mode, only the required data is output. Consequently, no unnecessary bus cycles are generated even when a cache-through area is accessed. Figure 7.16 shows the single read basic timing.
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS Note: * Address pin to be connected to pin A10 of SDRAM. Tc1 Td1 Tde Tap
Figure 7.16 Basic Timing for Single Read (Auto Precharge) Burst Write: A burst write occurs in the following cases in this LSI. 1. Access size in writing is larger than data bus width. 2. Write-back of the cache 3. 16-byte transfer by DMAC and E-DMAC (access to non-cacheable area) This LSI always accesses SDRAM with burst length 1. For example, write access of burst length 1 is performed consecutively four times to write 16-byte consecutive data to the SDRAM that is connected to a 32-bit data bus. The relationship between the access size and the number of bursts is shown in table 7.18.
Rev. 6.00 Jul. 15, 2009 Page 172 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Figure 7.17 shows a timing chart for burst writes. In burst write, the ACTV command is output in the Tr cycle, the WRIT command is issued in the Tc1, Tc2, and Tc3 cycles, and the WRITA command is issued to execute an auto-precharge in the Tc4 cycle. In the write cycle, the write data is output simultaneously with the write command. After the write command with the autoprecharge is output, the Trw1 cycle that waits for the auto-precharge initiation is followed by the Tap cycle that waits for completion of the auto-precharge induced by the WRITA command in the SDRAM. In the Tap cycle, a new command will not be issued to the same bank. However, other CS areas and other banks can be accessed. The number of Trw1 cycles is specified by bits TRWL1 and TRWL0 in CS3WCR. The number of Tap cycles is specified by bits WTRP1 and WTRP0 in CS3WCR.
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS Tc1 Tc2 Tc3 Tc4 Trwl Tap
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.17 Basic Timing for Burst Write (Auto Precharge)
Rev. 6.00 Jul. 15, 2009 Page 173 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Single Write: A write access ends in one cycle when data is written in non-cacheable area and the data bus width is larger than or equal to access size. Figure 7.18 shows the single write basic timing.
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS Tc1 Trwl Tap
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.18 Basic Timing for Single Write (Auto-Precharge) Bank Active: The synchronous DRAM bank function is used to support high-speed accesses to the same row address. When the BACTV bit in SDCR is 1, accesses are performed using commands without auto-precharge (READ or WRIT). This function is called bank-active function. When a bank-active function is used, precharging is not performed when the access ends. When accessing the same row address in the same bank, it is possible to issue the READ or WRIT command immediately, without issuing an ACTV command. Since synchronous DRAM is internally divided into several banks, it is possible to keep one row address in each bank activated. If the next access is to a different row address, a PRE command is first issued to precharge the relevant bank, then when precharging is completed, the access is performed by issuing an ACTV command followed by a READ or WRIT command. If this is followed by an access to a different row address, the access time will be longer because of the precharging performed after the access request is issued. The number of cycles between issuance of the PRE command and the ACTV command is determined by bits WTRP1 and WTRP0 in CSnWCR.
Rev. 6.00 Jul. 15, 2009 Page 174 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
In a write access, when an auto-precharge is performed, a command cannot be issued to the same bank for a period of Trwl + Tap cycles after issuance of the WRITA command. When bank active mode is used, READ or WRIT command can be issued successively if the row address is the same. The number of cycles can thus be reduced by Trwl + Tap cycles for each write. There is a limit on tRAS, the time for placing each bank in the active state. If there is no guarantee that another row address will be accessed within the period in which this value is maintained by program execution, it is necessary to set auto-refreshing and set the refresh cycle to no more than the maximum value of tRAS. A burst read cycle without auto-precharge is shown in figure 7.19, a burst read cycle for the same row address in figure 7.20, and a burst read cycle for different row addresses in figure 7.21. Likewise, a single write cycle without auto-precharge is shown in figure 7.22, a single write cycle for the same row address in figure 7.23, and a single write cycle for different row addresses in figure 7.24. In figure 7.20, a Tnop cycle in which no operation is performed is inserted before the Tc cycle that issues the READ command. The Tnop cycle is inserted to secure two cycles of CAS latency for the DQMxx signal that specifies which byte data is read from SDRAM. If the CAS latency is specified as two cycles or more, the Tnop cycle is not inserted because the two cycles of latency can be secured even if the DQMxx signal is asserted after the Tc cycle. When bank active mode is set, if only accesses to the respective banks in the area 3 are considered, as long as accesses to the same row address continue, the operation starts with the cycle in figure 7.19 or 7.22, followed by repetition of the cycle in figure 7.20 or 7.23. An access to a different area during this time has no effect. When a different row address is accessed in the bank active state, the bus cycle shown in figure 7.21 or 7.24 is executed instead of that in figure 7.20 or 7.23. In bank active mode, too, all banks become inactive after a refresh cycle.
Rev. 6.00 Jul. 15, 2009 Page 175 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tc1
Td1 Tc2
Td2 Tc3
Td3 Tc4
Td4 Tde
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.19 Burst Read Timing (No Auto Precharge)
Rev. 6.00 Jul. 15, 2009 Page 176 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tnop CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tc1
Td1 Tc2
Td2 Tc3
Td3 Tc4
Td4 Tde
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.20 Burst Read Timing (Bank Active, Same Row Address)
Rev. 6.00 Jul. 15, 2009 Page 177 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tp CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tpw
Tr
Tc1
Td1 Tc2
Td2 Tc3
Td3 Tc4
Td4 Tde
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.21 Burst Read Timing (Bank Active, Different Row Addresses)
Rev. 6.00 Jul. 15, 2009 Page 178 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tr CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tc1
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.22 Single Write Timing (No Auto Precharge)
Rev. 6.00 Jul. 15, 2009 Page 179 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tnop CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tc1
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.23 Single Write Timing (Bank Active, Same Row Address)
Rev. 6.00 Jul. 15, 2009 Page 180 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tp CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tpw
Tr
Tc1
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.24 Single Write Timing (Bank Active, Different Row Addresses) Refreshing: This LSI has a function for controlling synchronous DRAM refreshing. Autorefreshing can be performed by clearing the RMODE bit to 0 and setting the RFSH bit to 1 in SDCR. A consecutive refreshing can be performed by setting bits RRC2 to RRC0 in RTCSR. If synchronous DRAM is not accessed for a long period, self-refreshing mode, in which the power consumption for data retention is low, can be activated by setting both the RMODE bit and the RFSH bit to 1. 1. Auto-refreshing Refreshing is performed at intervals determined by the input clock selected by bits CKS2 to CKS0 in RTCSR, and the value set by in RTCOR. The value of bits CKS[2:0] in RTCOR should be set so as to satisfy the given refresh interval for the synchronous DRAM used. First make the settings for RTCOR, RTCNT, and the RMODE, then make the CKS[2:0] and RRC[2:0] settings. When the clock is selected by bits CKS[2:0], RTCNT starts counting up from the value at that time. The RTCNT value is constantly compared with the RTCOR value, and if the two values are the same, a refresh request is generated and an auto-refreshing is performed for the number of times specified by the RRC[2:0]. At the same time, RTCNT is cleared to 0 and the count-up is restarted.
Rev. 6.00 Jul. 15, 2009 Page 181 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Figure 7.25 shows the auto-refreshing cycle timing. After starting the auto-refreshing, PALL command is issued in the Tp cycle to make all the banks to precharged state from active state when some bank is being precharged. Then the REF command is issued in the Trr cycle after inserting idle cycles of which number is specified by bits WTRP1 and WTRP0 in CSnWCR. A new command is not issued for the duration of the number of cycles specified by bits WTRC1 and WTRC0 in CSnWCR after the Trr cycle. Bits WTRC1 and WTRC0 in CSnWCR must be set so as to satisfy the SDRAM refreshing cycle time (tRC). A Tpw cycle is inserted between the Tp cycle and Trr cycle when the setting of bits WTRP1 and WTRP0 in CSnWCR is longer than or equal to two cycles.
Tp CKIO A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS Hi-z Tpw Trr Trc Trc Trc
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.25 Auto-Refreshing Timing
Rev. 6.00 Jul. 15, 2009 Page 182 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
2. Self-refreshing When self-refreshing mode is selected, the refresh timing and refresh addresses are generated within the synchronous DRAM. Self-refreshing is activated by setting both the RMODE bit and the RFSH bit in SDCR to 1. After starting the self-refreshing, the PALL command is issued in the Tp cycle after the completion of pre-charging the bank. The SELF command is then issued after inserting idle cycles of which the number is specified by bits WTRP1 and WTRP0 in CSnWSR. Synchronous DRAM cannot be accessed while self-refreshing. Selfrefreshing mode is cleared by clearing the RMODE bit to 0. After self-refreshing mode has been cleared, command issuance is disabled for the number of cycles specified by bits WTRC1 and WTRC0 in CSnWCR. Self-refreshing timing is shown in figure 7.26. Settings must be made immediately after clearing self-refreshing mode so that auto-refreshing is performed at the correct intervals. When self-refreshing is activated from the auto-refreshing mode, only clearing the RMODE bit to 1 resumes auto-refreshing mode. If it takes long time to start the auto-refreshing, setting RTCNT to the value of RTCOR - 1 starts the auto-refreshing immediately. After self-refreshing has been set, the self-refreshing mode continues even in standby mode, and is maintained even after recovery from standby mode by an interrupt. Since the BSC registers are initialized at a power-on reset, the self-refreshing mode is cleared.
Rev. 6.00 Jul. 15, 2009 Page 183 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tp CKIO CKE A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS
Tpw
Trr
Trc
Trc
Trc
Trc
Trc
Hi-z
Note: * Address pin to be connected to pin A10 of SDRAM.
Figure 7.26 Self-Refreshing Timing Relationship between Refresh Requests and Bus Cycles: If a refresh request occurs during bus cycle execution, the refresh cycle must wait for the bus cycle to be completed. If a new refresh request occurs while the previous refresh request is not performed, the previous refresh request is deleted. To refresh correctly, a bus cycle longer than the refresh interval or the bus busy must be prevented. Power-On Sequence: In order to use synchronous DRAM, mode setting must first be performed after turning the power on. To perform synchronous DRAM initialization correctly, the BSC registers must first be set, followed by writing to the synchronous DRAM mode register. When writing to the synchronous DRAM mode register, the address signal value at that time is latched by a combination of the CSn, RAS, CAS, and RD/WR signals. If the value to be set is X, write to the address of H'F8FD5000 + X in words. In this operation, the data is ignored. To set burst read/single write, burst read/burst write, CAS latency 2 to 3, wrap type = sequential, and burst length 1 supported by the LSI, arbitrary data is written to the addresses shown in table 7.19 in bytes. In this case, 0s are output at the external address pins of A12 or later.
Rev. 6.00 Jul. 15, 2009 Page 184 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Table 7.19 Access Address for SDRAM Mode Register Write * Burst read/single write (burst length 1)
Data Bus Width 16 bits CAS Latency 2 3 32 bits 2 3 Access Address H'F8FD5440 H'F8FD5460 H'F8FD50880 H'F8FD58C0 External Address Pin H'0000440 H'0000460 H'0000880 H'00008C0
* Burst read/burst write (burst length 1)
Data Bus Width 16 bits CAS Latency 2 3 32 bits 2 3 Access Address H'F8FD5040 H'F8FD5060 H'F8FD5080 H'F8FD50C0 External Address Pin H'0000040 H'0000060 H'0000080 H'00000C0
Mode register setting timing is shown in figure 7.27. The PALL command (all bank precharge command) is firstly issued. The REF command (auto-refreshing command) is then issued eight times. The MRS command (mode register write command) is finally issued. Idle cycles, of which number is specified by bits WTRP1 and WTRP0 in CSnWCR, are inserted between the PALL and the first REF commands. Idle cycles, of which number is specified by bits WTRC1 and WTRC0 in CSnWCR, are inserted between the REF and REF commands, and between the 8th REF and MRS commands. In addition, one or more idle cycles are inserted between the MRS and the next command. It is necessary to keep idle time of certain cycles for SDRAM before issuing the PALL command after turning the power on. Refer the manual of the SDRAM for the idle time to be needed. When the pulse width of the reset signal is longer then the idle time, mode register setting can be started immediately after the reset, but care should be taken when the pulse width of the reset signal is shorter than the idle time.
Rev. 6.00 Jul. 15, 2009 Page 185 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tp PALL CKIO
Tpw
Trr REF
Trc
Trc
Trr REF
Trc
Trc
Tmw MRS
Tnop
A25 to A0 A11* CSn RAS CAS RD/WR DQMxx D BS Note: * Address pin to be connected to pin A10 of SDRAM. Hi-Z
Figure 7.27 Write Timing for SDRAM Mode Register (Based on JEDEC) 7.5.6 Byte-Selection SRAM Interface
The byte-selection SRAM interface is for access to SRAM which has a byte-selection pin (WEn (BEn)). This interface is used to access to SRAM which has 16-bit data pins and upper and lower byte selection pins, such as UB and LB. When the BAS bit in CSnWCR is cleared to 0 (initial value), the write access timing of the byteselection SRAM interface is the same as that for the normal space interface. While in read access of a byte-selection SRAM interface, the byte-selection signal is output from the WEn (BEn) pin, which is different from that for the normal space interface. The basic access timing is shown in figure 7.28. In write access, data is written to the memory according to the timing of the byteselection pin (WEn (BEn)). For details, refer to the data sheet for the corresponding memory. If the BAS bit in CSnWCR is set to 1, the WEn (BEn) pin and RD/WR pin timings change. The basic access timing is shown in figure 7.29. In write access, data is written to the memory according to the timing of the write enable pin (RD/WR). The data hold timing from RD/WR negation to data write must be secured by setting bits HW1 to HW0 in CSnWCR. Figure 7.30 shows the access timing when a software wait is specified.
Rev. 6.00 Jul. 15, 2009 Page 186 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
T1
T2
CKIO
A25 to A0
CSn WEn(BEn)
RD/WR
Read
RD
D
RD/WR High
Write
RD
D
BS
Figure 7.28 Basic Access Timing for Byte-Selection SRAM (BAS = 0)
Rev. 6.00 Jul. 15, 2009 Page 187 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
T1 CKIO
T2
A25 to A0
CSn WEn(BEn)
RD/WR
Read
RD
D
RD/WR Write High RD D
BS
Figure 7.29 Basic Access Timing for Byte-Selection SRAM (BAS = 1)
Rev. 6.00 Jul. 15, 2009 Page 188 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Th
T1
Tw
T2
Th
CKIO
A25 to A0
CSn
WEn(BEn)
RD/WR
Read
RD D
RD/WR High
Write
RD
D
BS
Figure 7.30 Wait Timing for Byte-Selection SRAM (BAS = 1) (Software Wait Only)
Rev. 6.00 Jul. 15, 2009 Page 189 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
This LSI A17
64 kwords x 16 bits SRAM A15
....
A2 CSn RD RD/WR D31 D16 WE3(BE3) WE2(BE2) D15
....
....
D0 WE1(BE1) WE0(BE0)
Figure 7.31 Example of Connection with 32-Bit Data-Width Byte-Selection SRAM
64 kwords x 16 bits SRAM
This LSI
...
A1 CSn RD RD/WR D15
...
D0 WE1(BE1) WE0(BE0)
Figure 7.32 Example of Connection with 16-Bit Data-Width Byte-Selection SRAM
Rev. 6.00 Jul. 15, 2009 Page 190 of 816 REJ09B0237-0600
...
...
A16
A16 A1 CS OE WE I/O 15 I/O 0 UB LB
....
I/O0 UB LB
....
A0 CS OE WE I/O15
....
I/O0 UB LB A15
....
A0 CS OE WE I/O15
Section 7 Bus State Controller (BSC)
7.5.7
PCMCIA Interface
With this LSI, if address map 2 is selected using the MAP bit in CMNCR, the PCMCIA interface can be specified in areas 5 and 6. Areas 5 and 6 in the physical space can be used for the IC memory card and I/O card interface defined in the JEIDA specifications version 4.2 (PCMCIA2.1 Rev. 2.1) by specifying bits TYPE3 to TYPE0 in CSnBCR (n = 5B and 6B) to B'0101. In addition, bits SA1 and SA0 in CSnWCR (n = 5B and 6B) assign the upper or lower 32 Mbytes of each area to an IC memory card or I/O card interface. For example, if bits SA1 and SA0 in CS5BWCR are set to 1 and cleared to 0, respectively, the upper 32 Mbytes and the lower 32 Mbytes of area 5B are used as an IC memory card interface and I/O card interface, respectively. When the PCMCIA interface is used, the bus size must be specified as 8 bits or 16 bits using bits BSZ1 and BSZ0 in CS5BBCR or CS6BBCR. Figure 7.33 shows an example of a connection between this LSI and the PCMCIA card. To enable insertion and removal of the PCMCIA card with the system power turned on, tri-state buffers must be connected between the LSI and the PCMCIA card. In the JEIDA and PCMCIA standards, operation in big endian mode is not clearly defined. Consequently, the provided PCMCIA interface in big endian mode is available only for this LSI.
Rev. 6.00 Jul. 15, 2009 Page 191 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
This LSI A25 to A0 D7 to D0 D15 to D8 RD/WR CE1A CE2A
G DIR G
PC card (memory or I/O) A25 to A0
D7 to D0
D15 to D8
G DIR
CE1 CE2 RD WE ICIORD ICIOWR I/O Port
G
OE WE/PGM IORD IOWR REG
WAIT IOIS16
Card detection circuit
WAIT IOIS16 CD1, CD2
Figure 7.33 Example of PCMCIA Interface Connection
Rev. 6.00 Jul. 15, 2009 Page 192 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Basic Timing for Memory Card Interface: Figure 7.34 shows the basic timing of the PCMCIA IC memory card interface. If areas 5 and 6 in the physical space are specified as the PCMCIA interface, accessing the common memory areas in areas 5 and 6 automatically accesses with the IC memory card interface. If the external bus frequency (CKIO) increases, the setup times and hold times for the address pins (A25 to A0), card enable signals (CE1A, CE2A, CE1B, CE2B), and write data (D15 to D0) to the RD and WE signals become insufficient. To prevent this error, this LSI can specify the setup times and hold times for areas 5 and 6 in the physical space independently, using CS5BWCR and CS6BWCR. In the PCMCIA interface, as in the normal space interface, a software wait or hardware wait can be inserted using the WAIT pin. Figure 7.35 shows the PCMCIA memory bus wait timing.
Tpcm1 CKIO Tpcm1w Tpcm1w Tpcm1w Tpcm2
A25 to A0 CExx RD/WR RD Read D WE Write D BS
Figure 7.34 Basic Access Timing for PCMCIA Memory Card Interface
Rev. 6.00 Jul. 15, 2009 Page 193 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tpcm0 CKIO A25 to A0 CExx RD/WR RD Read D WE Write D BS WAIT
Tpcm0w
Tpcm1
Tpcm1w
Tpcm1w Tpcm1w
Tpcm1w
Tpcm2
Tpcm2w
Figure 7.35 Wait Timing for PCMCIA Memory Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Wait = 1, Hardware Wait = 1) When 32 Mbytes of the memory space are used as an IC memory card interface, a port is used to generate the REG signal that switches between the common memory and attribute memory. When the memory space used for the IC memory card interface is 16 Mbytes or less, pin A24 can be used as the REG signal by allocating 16-Mbyte memory space to each the common memory space and the attribute memory space.
Rev. 6.00 Jul. 15, 2009 Page 194 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
PCMCIA interface area is 32 Mbytes (An I/O port pin is used as the REG) Area 5 : H'14000000 Attribute memory/common memory Area 5 : H'16000000 I/O space Area 6 : H'18000000 Attribute memory/common memory Area 6 : H'1A000000 I/O space
PCMCIA interface area is 16 Mbytes (A24 is used as the REG) Area 5 : H'14000000 Area 5 : H'15000000 Area 5 : H'16000000 H'17000000 Area 6 : H'18000000 Area 6 : H'19000000 Area 6 : H'1A000000 H'1B000000 Attribute memory Common memory I/O space Attribute memory Common memory I/O space
Figure 7.36 Example of PCMCIA Space Assignment (CS5BWCR.SA[1:0] = B'10, CS6BWCR.SA[1:0] = B'10) Basic Timing for I/O Card Interface: Figures 7.37 and 7.38 show the basic timings for the PCMCIA I/O card interface. The I/O card and IC memory card interfaces are specified by an address to be accessed. When area 5 of the physical space is specified as the PCMCIA and both bits SA1 and SA0 in CS5BWCR are set to 1, the I/O card interface can automatically be specified by accessing the physical addresses from H'16000000 to H'17FFFFFF and from H'14000000 to H'15FFFFFF. When area 6 of the physical space is specified as the PCMCIA and both bits SA1 and SA0 in CS6BWCR are set to 1, the I/O card interface can automatically be specified by accessing the physical addresses from H'1A000000 to H'1BFFFFFF and from H'18000000 to H'19FFFFFF. Note that areas to be accessed as the PCMCIA I/O card must be non-cached (space P2). If the PCMCIA card is accessed as an I/O card in little endian mode, dynamic bus sizing for the I/O bus can be achieved using the IOIS16 signal. If the IOIS16 signal is driven high in a word-size I/O bus cycle while the bus width of area 6 is specified as 16 bits, the bus width is recognized as 8 bits and data is accessed twice in units of eight bits in the I/O bus cycle to be executed.
Rev. 6.00 Jul. 15, 2009 Page 195 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
The IOIS16 signal is sampled at the falling edge of the CKIO signal in the Tpci0, Tpci0w, and Tpci1 cycles when bits TED3 to TED0 are specified as 1.5 cycles or more, and is reflected in the CE2 signal 1.5 cycles after the CKIO sampling point. Bits TED3 to TED0 must be specified appropriately to satisfy the setup time of the PC card from ICIORD and ICIOWR to CEn. Figure 7.39 shows the dynamic bus sizing basic timing. Note that the IOIS16 signal is not supported in big endian mode. In the big endian mode, the IOIS16 signal must be fixed low.
Tpci1 Tpci1w Tpci1w Tpci1w Tpci2
CKIO
A25 to A0
CExx
RD/WR
ICIORD Read D
ICIOWR Write D
BS
Figure 7.37 Basic Timing for PCMCIA I/O Card Interface
Rev. 6.00 Jul. 15, 2009 Page 196 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Tpci0 CKIO A25 to A0 CExx RD/WR ICIORD Read D ICIOWR Write D BS WAIT IOIS16
Tpci0w
Tpci1
Tpci1w
Tpci1w
Tpci1w
Tpci1w
Tpci2
Tpci2w
Figure 7.38 Wait Timing for PCMCIA I/O Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Wait = 1, Hardware Wait = 1)
Tpci0 CKIO A25 to A0 CE1x CE2x RD/WR ICIORD Read D ICIOWR Write D BS WAIT IOIS16 Tpci0w Tpci1 Tpci1w Tpci1w Tpci1w Tpci1w Tpci2 Tpci2w Tpci0 Tpci0w Tpci1 Tpci1w Tpci1w Tpci1w Tpci1w Tpci2 Tpci2w
Figure 7.39 Timing for Dynamic Bus Sizing of PCMCIA I/O Card Interface (TED[3:0] = B'0010, TEH[3:0] = B'0001, Software Waits = 3)
Rev. 6.00 Jul. 15, 2009 Page 197 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
7.5.8
Wait between Access Cycles
Data output in the previous cycle may conflict with that in the next cycle because the buffer-off timing of devices with slow access speed cannot be operated to satisfy the higher operating frequency of LSIs. As a result of these conflict, the reliability of the device is low and malfunctions may occur. This LSI has a function that avoids data conflicts by inserting wait cycles between consecutive access cycles. The number of wait cycles between access cycles can be set by bits IWW1 and IWW0, bits IWRWD1 and IWRWD0, bits IWRWS1 and IWRWS0, bits IWRRD1 and IWRRD0, and bits IWRRS1 and IWRRS0 in CSnBCR. The conditions for setting the wait cycles between access cycles (idle cycles) are shown below. 1. 2. 3. 4. 5. Consecutive accesses are write-read or write-write Consecutive accesses are read-write for different areas Consecutive accesses are read-write for the same area Consecutive accesses are read-read for different areas Consecutive accesses are read-read for the same area Others
7.5.9
Reset: The bus state controller (BSC) can be initialized completely only by a power-on reset. At power-on reset, all signals are negated and output buffers are turned off regardless of the bus cycle state. All control registers are initialized. In standby mode and sleep mode, control registers of the BSC are not initialized. Some flash memories may stipulate a minimum time from reset release to the first access. To ensure this minimum time, the BSC supports a 7-bit counter (RWTCNT). At a power-on reset, the RWTCNT contents are cleared to 0. After a power-on reset, RWTCNT is counted up in synchronization with the CKIO signal and an external access will not be generated until RWTCNT is counted up to H'007F. Access from the Site of the LSI Internal Bus Master: There are three types of LSI internal buses: a cache bus, internal bus, and peripheral bus. The CPU and cache memory are connected to the cache bus. Internal bus masters other than the CPU and BSC are connected to the internal bus. Low-speed peripheral modules are connected to the peripheral bus. Internal memory other than the cache memory and debugging modules such as the UBC are connected to both the cache bus and internal bus. Access from the cache bus to the internal bus is enabled but access from the internal bus to the cache bus is disabled. This gives rise to the following problems.
Rev. 6.00 Jul. 15, 2009 Page 198 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
Internal bus masters other than the CPU such as the DMAC and E-DMAC can access on-chip memory other than the cache memory but cannot access the cache memory. If an on-chip bus master other than the CPU writes data to an external memory other than the cache, the contents of the external memory may differ from that of the cache memory. To prevent this problem, if the external memory whose contents is cached is written by an on-chip bus master other than the CPU, the corresponding cache memory should be purged by software. If the CPU initiates read access for the cache, the cache is searched. If the cache stores data, the CPU latches the data and completes the read access. If the cache does not store data, the CPU performs four consecutive longword read cycles to perform cache fill operations via the internal bus. If a cache miss occurs in byte or word operand access or at a branch to an odd word boundary (4n + 2), the CPU performs four consecutive longword accesses to perform a cache fill operation on the external interface. For a cache-through area, the CPU performs access according to the actual access addresses. For an instruction fetch to an even word boundary (4n), the CPU performs longword access. For an instruction fetch to an odd word boundary (4n + 2), the CPU performs word access. For a read cycle of a cache-through area or an on-chip peripheral module, the read cycle is first accepted and then read cycle is initiated. The read data is sent to the CPU via the cache bus. In a write cycle for the cache area, the write cycle operation differs according to the cache write methods. In write-back mode, the cache is first searched. If data is detected at the address corresponding to the cache, the data is then re-written to the cache. In the actual memory, data will not be re-written until data in the corresponding address is re-written. If data is not detected at the address corresponding to the cache, the cache is updated. In this case, data to be updated is first saved to the internal buffer, 16-byte data including the data corresponding to the address is then read, and data in the corresponding access of the cache is finally updated. Following these operations, a write-back cycle for the saved 16-byte data is executed. In write-through mode, the cache is first searched. If data is detected at the address corresponding to the cache, the data is re-written to the cache simultaneously with the actual write via the internal bus. If data is not detected at the address corresponding to the cache, the cache is not updated but an actual write is performed via the internal bus. Since the BSC incorporates a 1-stage write buffer, the BSC can execute an access via the internal bus before the previous external bus cycle is completed in a write cycle. If the on-chip module is read or written after the external low-speed memory is written, the on-chip module can be accessed before the completion of the external low-speed memory write cycle.
Rev. 6.00 Jul. 15, 2009 Page 199 of 816 REJ09B0237-0600
Section 7 Bus State Controller (BSC)
In read cycles, the CPU is placed in the wait cycle until read operation has been completed. To continue the process after the data write to the device has been completed, perform a dummy read to the same address to check for completion of the write before the next process to be executed. The write buffer of the BSC functions in the same way for an access by a bus master other than the CPU such as the DMAC or E-DMAC. Accordingly, to perform dual address DMA transfers, the next read cycle is initiated before the previous write cycle is completed. Note, however, that if both the DMA source and destination addresses exist in external memory space, the next write cycle will not be initiated until the previous write cycle is completed. On-Chip Peripheral Module Access: To access an on-chip module register, two or more peripheral module clock (P) cycles are required. Care must be taken in system design.
Rev. 6.00 Jul. 15, 2009 Page 200 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Section 8 Clock Pulse Generator (CPG)
This LSI has a clock pulse generator (CPG) that generates an internal clock (I), a peripheral clock (P), a bus clock (B), and a clock (M) for the on-chip IEEE802.3-PHY (physical layer device, hereinafter called PHY). The CPG consists of an oscillator, PLL circuits, and divider circuits.
8.1
Features
* Four clock modes Selection of four clock modes depending on the frequency of a clock source and whether a crystal resonator or external clock input is in use. * Four clocks generated independently An internal clock (I) for the CPU and cache; a peripheral clock (P) for the on-chip peripheral modules; a bus clock (B = CKIO) for the external bus interface; and a clock (M) for the on-chip PHY. * Frequency change function Frequencies of the internal clock, peripheral clock, and clock for the PHY can be changed independently using the PLL circuit and divider circuit within the CPG. Frequencies are changed by software using the frequency control register (FRQCR) and PHY clock frequency control register (MCLKCR) settings. * Power-down mode control The clock can be stopped in sleep mode and software standby mode and specific modules can be stopped using the module standby function.
Rev. 6.00 Jul. 15, 2009 Page 201 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
A block diagram of the CPG is shown in figure 8.1.
Oscillator unit
Divider 2 x1 x1/2 x1/4 x1/5 Divider 1 x1 PLL circuit 1 (x1, x2) CKIO XTAL EXTAL Crystal oscillator Bus clock (B = CKIO) x1/2 x1/4 Internal clock (I) PHY clock (M)
PLL circuit 2 (x2, x4)
Peripheral clock (P)
CPG control unit MD2 MD1 MD0 FRQCR Clock frequency control circuit
Standby control circuit
MCLKCR
STBCR
STBCR2
STBCR3
STBCR4
Bus interface
[Legend] FRQCR: STBCR: STBCR2: STBCR3: STBCR4: MCLKCR:
Internal bus Frequency control register Standby control register Standby control register 2 Standby control register 3 Standby control register 4 PHY clock frequency control register
Figure 8.1 Block Diagram of CPG
Rev. 6.00 Jul. 15, 2009 Page 202 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
The clock pulse generator blocks function as follows: PLL Circuit 1: PLL circuit 1 leaves the input clock frequency from the PLL circuit 2 unchanged or doubles it. The multiplication ratio is set by the frequency control register. The phase of the rising edge of the internal clock is controlled so that it will match the phase of the rising edge of the CKIO pin. PLL Circuit 2: PLL circuit 2 doubles or quadruples the clock frequency input from the crystal oscillator or the EXTAL pin. The multiplication ratio is fixed for each clock operating mode. The clock operating mode is set with pins MD0, MD1, or MD2. Crystal Oscillator: The crystal oscillator is an oscillator circuit when a crystal resonator is connected to the XTAL and EXTAL pins. The crystal oscillator can be used by setting the clock operating mode. Divider 1: Divider 1 generates clocks with the frequencies used by the internal clock, peripheral clock, and bus clock. The frequency output as the internal clock is always the same as that of the devider1 output. The frequency output as the bus clock is automatically selected so that it is the same as the frequency of the CKIO signal according to the multiplication ratio of PLL circuit 1. The frequencies can be 1, 1/2, or 1/4 times the output frequency of PLL circuit 1, as long as it stays at or above the frequency of the CKIO pin. The division ratio is set in the frequency control register. Divider 2: Divider 2 generates a clock that is supplied to the on-chip PHY. Divider 2 must output 25-MHz frequency for the on-chip PHY that requires 25-MHz clock. The output clock of divider 2 can be 1, 1/2, 1/4, or 1/5 times the output frequency of PLL circuit 1. The division ratio is set in the PHY clock frequency control register. Clock Frequency Control Circuit: The clock frequency control circuit controls the clock frequency using pins MD0, MD1, and MD2, the frequency control register, and PHY clock frequency control register. Standby Control Circuit: The standby control circuit controls the state of the on-chip oscillator circuit and other modules during clock switching and in software standby mode. Frequency Control Register: The frequency control register has control bits assigned for the following functions: clock output/non-output from the CKIO pin, the frequency multiplication ratio of PLL circuit 1, and the frequency division ratio of the peripheral clock. Standby Control Register: The standby control register has bits for controlling the power-down modes. For details, see section 10, Power-Down Modes.
Rev. 6.00 Jul. 15, 2009 Page 203 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
PHY Clock Frequency Control Register: The PHY clock frequency control register sets the frequency division ratio of the PHY clock.
8.2
Input/Output Pins
Table 8.1 shows the CPG pin configuration. Table 8.1
Pin Name
Pin Configuration
Abbr. I/O Input Input Input Output Input Output Description Set the clock operating mode. Set the clock operating mode. Set the clock operating mode. Connects a crystal resonator. Connects a crystal resonator or an external clock. Outputs an external clock.
Mode control pins* MD0 MD1 MD2 Clock input pins XTAL EXTAL Clock output pin Note: * CKIO
The values of these mode control pins are sampled only at a power-on reset or in a software standby with the MDCHG bit in STBCR to 1. This can prevent the erroneous operation of this LSI.
8.3
Clock Operating Modes
Table 8.2 shows the relationship between the mode control pins (MD2 to MD0) combinations and the clock operating modes. Table 8.3 shows the usable frequency ranges in the clock operating modes and the frequency range of the input clock. Table 8.2 Mode Control Pins and Clock Operating Modes
Clock I/O Source EXTAL Crystal resonator EXTAL Crystal resonator Output CKIO CKIO CKIO CKIO PLL2 ON (x4) ON (x4) ON (x2) ON (x2) PLL1 CKIO Frequency
Clock Pin Values Operating Mode MD2 MD1 MD0 1 2 5 6 0 0 1 1 0 1 0 1 1 0 1 0
ON (x1, x2) (EXTAL) x 4 ON (x1, x2) (Crystal resonator) x 4 ON (x1, x2) (EXTAL) x 2 ON (x1, x2) (Crystal resonator) x 2
Rev. 6.00 Jul. 15, 2009 Page 204 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Mode 1: The frequency of the external clock input from the EXTAL pin is quadrupled by PLL circuit 2, and then the clock is supplied to this LSI. Since the input clock frequency ranging 10 MHz to 15.625 MHz can be used, the CKIO frequency ranges from 40 MHz to 62.5 MHz. Mode 2: The frequency of the on-chip crystal oscillator output is quadrupled by PLL circuit 2, and then the clock is supplied to this LSI. Since the crystal resonator frequency ranging 10 MHz to 15.625 MHz can be used, the CKIO frequency ranges from 40 MHz to 62.5 MHz. Mode 5: The frequency of the external clock from the EXTAL pin is doubled by PLL circuit 2, and then the clock is supplied to this LSI. Since the input clock frequency ranging 10 MHz to 25 MHz, the CKIO frequency ranges from 20 MHz to 50 MHz. Mode 6: The frequency of the on-chip crystal oscillator output is doubled by PLL circuit 2, and then the clock is supplied to the LSI. Since the crystal oscillation frequency ranging 10 MHz to 25 MHz can be used, the CKIO frequency ranges from 20 MHz to 50 MHz. Table 8.3 Possible Combination of Clock Modes and FRQCR Values
Input Clock Frequency Range (P must be equal CKIO Pin to or lower than Frequency 31.25 MHz) Range 10 MHz to 15.625 MHz 40 MHz to 62.5 MHz
Mode 1 or 2
FRQCR Register Value H'1000 H'1001 H'1003 H'1101 H'1103
PLL Circuit 1 ON (x1) ON (x1) ON (x1) ON (x2) ON (x2) ON (x1) ON (x1) ON (x1) ON (x2) ON (x2)
PLL Circuit 2 ON (x4) ON (x4) ON (x4) ON (x4) ON (x4) ON (x2) ON (x2) ON (x2) ON (x2) ON (x2)
Clock Ratio* (I:B:P) 4:4:4 4:4:2 4:4:1 8:4:4 8:4:2 2:2:2 2:2:1 2:2:1/2 4:2:2 4:2:1
5 or 6
H'1000 H'1001 H'1003 H'1101 H'1103
10 MHz to 25 MHz
20 MHz to 50 MHz
Note:
*
Input clock is assumed to be 1.
Rev. 6.00 Jul. 15, 2009 Page 205 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Cautions: 1. The internal clock frequency is the product of the frequency of the CKIO pin and the frequency multiplication ratio of PLL circuit 1. 2. The peripheral clock frequency is the product of the frequency of the CKIO pin, the frequency multiplication ratio of PLL circuit 1, and the division ratio of divider 1. Do not set the peripheral clock frequency lower than the CKIO pin frequency. 3. The PHY clock frequency is the product of the frequency of the CKIO pin, the frequency multiplication ratio of PLL circuit 1, and the division ratio of divider 2. 4. x1, x1/2, or x1/4 can be used as the division ratio of divider 1. This is set by the frequency control register. 5. The division ratio of divider 2 is selected from x1, x1/2, x1/4, or x1/5. This is set by the PHY clock frequency control register. 6. The output frequency of PLL circuit 1 is the product of the frequency of the CKIO pin and the multiplication ratio of PLL circuit 1. It is set by the frequency control register. 7. The bus clock frequency is always set to be equal to the frequency of the CKIO pin. 8. The clock mode, the FRQCR register value, and the frequency of the input clock should be decided to satisfy the range of operating frequency specified in section 25, Electrical Characteristics, with referring to table 8.3.
8.4
Register Descriptions
The CPG has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * Frequency control register (FRQCR) * PHY clock frequency control register (MCLKCR) 8.4.1 Frequency Control Register (FRQCR)
FRQCR is a 16-bit readable/writable register that specifies whether a clock is output from the CKIO pin in standby mode, the frequency multiplication ratio of PLL circuit 1, and the frequency division ratio of the peripheral clock. Only word access can be used on FRQCR. FRQCR is initialized by a power-on reset due to the external input signal. However, it is not initialized by a power-on reset due to a WDT overflow.
Rev. 6.00 Jul. 15, 2009 Page 206 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Bit 15 to 13
Bit Name
Initial Value All 0
R/W R
Description Reserved These bits are always read as 0. The write value should always be 0.
12
CKOEN
1
R/W
Clock Output Enable Specifies whether a clock continues to be output from the CKIO pin or the output level of the CKIO signal is fixed when leaving software standby mode. The CKIO output is fixed low when this bit is set to 0. Therefore, the malfunction of external circuits because of an unstable CKIO clock when leaving software standby mode can be prevented. 0: Output level of the CKIO signal is fixed low in software standby mode. 1: Clock input to the EXTAL pin is output to the CKIO pin during software standby mode in clock mode 1 or 5. However, the output level of the CKIO pin is fixed low for two cycles of P when changing from the normal mode to the standby mode. This prevents hazard which occurs when the source of the CKIO signal is changed from the PLL2 output to the EXTAL signal.
11
0
R
Reserved This bit is always read as 0. The write value should always be 0.
10 9 8 7 to 3
STC2 STC1 STC0
0 0 0 All 0
R/W R/W R/W R
PLL Circuit 1 Frequency Multiplication Ratio 000: x1 001: x2 Other values: Setting prohibited Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 207 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Bit 2 1 0
Bit Name PFC2 PFC1 PFC0
Initial Value 0 1 1
R/W R/W R/W R/W
Description Peripheral Clock Frequency Division Ratio Specify the division ratio of the peripheral clock frequency with respect to the output frequency of PLL circuit 1. 000: x1 001: x1/2 011: x1/4 Other values: Setting prohibited
8.4.2
PHY Clock Frequency Control Register (MCLKCR)
MCLKCR is an 8-bit readable/writable register. This register must be written to in words. The upper byte of the word data must be H'5A and the lower byte is the write data.
Bit 7 6 Bit Name FLSCS1 FLSCS0 Initial Value 0 1 R/W R/W R/W Description Source Clock Select Select the source clock. 00: PLL1 output clock 01: PLL1 output clock 10: Setting prohibited 11: Setting prohibited 5 to 3 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 2 1 0 FLDIVS2 FLDIVS1 FLDIVS0 0 1 1 R/W R/W R/W Divider Select Set the division ratio of PLL1 output. 000: x1 001: x1/2 011: x1/4 100: x1/5 Other values: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 208 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
8.4.3
Usage Notes
* MCLKCR is used only to generate clocks for the on-chip PHY. However, dedicated clocks input from the CK_PHY pin can be used instead of M, which is set by MCLKCR as clocks for the on-chip PHY. * When changing the contents of MCLKCR or FRQCR, make sure that the on-chip PHY is in the reset state. Otherwise, a hazard may be temporarily generated on M output. To use M as clocks for the on-chip PHY, assert the module reset of the on-chip PHY after the contents of MCLKCR or FRQCR have been changed.
Rev. 6.00 Jul. 15, 2009 Page 209 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
8.5
Changing Frequency
The internal clock frequency can be changed by changing the multiplication ratio of PLL circuit 1. The peripheral clock frequency can be changed either by changing the multiplication ratio of PLL circuit 1 or by changing the division ratio of divider 1. All of these are controlled by software through the frequency control register. The methods are described below. 8.5.1 Changing Multiplication Ratio
The PLL lock time must be preserved when the multiplication ratio of PLL circuit 1 is changed. The on-chip WDT counts for preserving the PLL lock time. 1. In the initial state, the multiplication ratio of PLL circuit 1 is 1. 2. Set a value that satisfies the given PLL lock time in the WDT and stop the WDT. The following must be set. TME bit in WTCSR = 0: WDT stops Bits CKS2 to CKS0 in WTCSR: Division ratio of WDT count clock WTCNT: Initial counter value 3. Set the desired value in bits STC2 to STC0 while the MDCHG bit in STBCR is 0. The division ratio can also be set in bits PFC2 to PFC0. 4. This LSI pauses internally and the WDT starts incrementing. The internal and peripheral clocks both stop and only the WDT is supplied with the clock. The clock will continue to be output on the CKIO pin. 5. Supply of the specified clock starts at a WDT count overflow, and this LSI starts operating again. The WDT stops after it overflows. Notes: 1. When the MDCHG bit in STBCR is set to 1, changing the FRQCR value has no effect on the operation immediately. For details, see section 8.5.3, Changing Clock Operating Mode. 2. The multiplication ratio should be changed after completion of the operation, if the onchip peripheral module is operating. The internal and peripheral clocks are stopped during the multiplication ratio is changed. The communication error may occur by the peripheral module communicating to the external IC, and the time error may occur by the timer unit (except the WDT). The edge detection of external interrupts (NMI and IRQ7 to IRQ0) cannot be performed.
Rev. 6.00 Jul. 15, 2009 Page 210 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
8.5.2
Changing Division Ratio
The WDT will not count unless the multiplication ratio is changed simultaneously. 1. In the initial state, PFC2 to PFC0 = 011. 2. Set the desired values in bits PFC2 to PFC0 while the MDCHG bit in STBCR is 0. The values that can be set are limited by the clock mode and the multiplication ratio of PLL circuit 1. Note that if the wrong value is set, this LSI will malfunction. 3. The clock is immediately changed to the new division ratio. Note: When the MDCHG bit in STBCR is set to 1, changing the FRQCR value has no effect on the operation immediately. For details, see section 8.5.3, Changing Clock Operating Mode. 8.5.3 Changing Clock Operating Mode
The values of the mode control pins (MD2 to MD0) that define a clock operating mode are fetched at a power-on reset and software standby while the MDCHG bit in STBCR is set to 1 register. Even if changing the FRQCR with the MDCHG bit set to 1, the clock mode cannot immediately be changed to the specified clock mode. This change can be reflected as a multiplication ratio or a division ratio after leaving software standby mode to change operating modes. Reducing the PLL settling time without changing again the multiplication ratio after the operating mode changing is possible by the use of this. The procedures for the mode change using software standby mode are described below. 1. Set bits MD2 to MD0 to the desired clock operating mode. 2. Set both the STBY and MDCHG bits in STBCR to 1. 3. Set the adequate value to the WDT so that the given oscillation settling time can be satisfied. Then stop the WDT. 4. Set FRQCR to the desired mode. Set bits STC2 to STC0 to the desired multiplication ratio. At this time, a division ratio can be set in bits PFC2 to PFC0. During the operation before the mode change, the clock cannot be changed to the specified clock. 5. Enter software standby mode using the SLEEP instruction. 6. Leave software standby mode using an interrupt. 7. After leaving software standby mode, this LSI starts the operation with the value of FRQCR that has been set before the mode change.
Rev. 6.00 Jul. 15, 2009 Page 211 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Notes: 1. Pins MD2 to MD0 should be set during the operation before the mode change or during software standby mode before requesting an interrupt. 2. Clear the STBY bit in STBCR in the exception handling routine for the interrupt in step 6. Otherwise, software standby mode is entered again. For details, see section 10.5.2, Canceling Software Standby Mode. 3. Once bits STC2 to STC0 are changed, the clock is not switched to the specified clock even if only bits PFC2 to PFC0 are changed. When bits STC2 to STC0 are changed after the MDCHG bit has been set to 1, the FRQCR setting must not be made until the clock mode is changed.
Rev. 6.00 Jul. 15, 2009 Page 212 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
8.6
Notes on Board Design
Note on Using an External Crystal Resonator: Place the crystal resonator, capacitors CL1 and CL2, and feedback resistor R1 as close to the XTAL and EXTAL pins as possible. In addition, to minimize induction and thus obtain oscillation at the correct frequency, the capacitors to be attached to the resonator must be grounded to the same ground. Do not bring wiring patterns close to these components.
Signal lines prohibited CL1 CL2 Reference value CL1 = 10 to 33 pF CL2 = 10 to 33 pF Rl = 1M Note: The values for CL1, CL2, and the damping resistance RI should be determined after consultation with the crystal resonator manufacturer.
Rl EXTAL XTAL
This LSI
Figure 8.2 Note on Using a Crystal Resonator Notes on Using External Clocks: When external clocks are input from the EXTAL pin, leave the XTAL pin open. In order to prevent a malfunction due to the reflection noise caused in a signal line which connected to XTAL pin, cut this signal line as short as possible. Notes on Bypass Capacitor: A multilayer ceramic capacitor must be inserted for each pair of Vss and Vcc as a bypass capacitor. The bypass capacitor must be inserted as close as possible to the power supply pins of the LSI. Note that the capacitance and frequency characteristics of the bypass capacitor must be appropriate for the operating frequency of the LSI. * Digital power supply pairs for internal logic A7-B7, E2-E1, E13-E12, H4-H3, K12-K13, M10-N10 * Power supply pairs for input and output A1-B1, A9-B9, B15-B14, H14-H15, K1-K2, R7-P7, P13-P14 * Power supply pairs for PLL N15-N14, R15-P15 * Analog power supply pairs for PHY N4-(N3, AP3), P4-P5 * No ground available that can be paired with R5 (Vcc3A)
Rev. 6.00 Jul. 15, 2009 Page 213 of 816 REJ09B0237-0600
Section 8 Clock Pulse Generator (CPG)
Notes on Using a PLL Oscillator Circuit: In the Vcc and Vss connection pattern for the PLL, signal lines from the board power supply pins must be as short as possible and pattern width must be as wide as possible to reduce inductive interference. Since the analog power supply pins of the PLL are sensitive to the noise, the system may malfunction due to inductive interference at the other power supply pins. To prevent such malfunction, the analog power supply pin Vcc and digital power supply pin VccQ should not supply the same resources on the board if at all possible.
Signal lines prohibited Vcc(PLL2)
Power supply
Vcc Vss(PLL2) Vcc(PLL1) Vss
Vss(PLL1)
Figure 8.3 Note on Using a PLL Oscillator Circuit
Rev. 6.00 Jul. 15, 2009 Page 214 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
Section 9 Watchdog Timer (WDT)
This LSI includes the watchdog timer (WDT) that can reset this LSI by the overflow of the counter when the value of the counter has not been updated because of a system runaway. The WDT is a single-channel timer that uses a peripheral clock as an input and counts the clock settling time when leaving software standby mode and temporary standby state, such as frequency changes. It can also be used as an interval timer.
9.1
Features
The WDT has the following features: * Can be used to ensure the clock settling time. The WDT can be used when leaving software standby mode and the temporary standby state which occur when the clock frequency is changed. * Can switch between watchdog timer mode and interval timer mode. * Internal resets in watchdog timer mode Internal resets are generated when the counter overflows. * Interrupts are generated in interval timer mode Interval timer interrupts are generated when the counter overflows. * Choice of eight counter input clocks Eight clocks (x1 to x1/4096) that are obtained by dividing the peripheral clock can be chosen.
Rev. 6.00 Jul. 15, 2009 Page 215 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
Figures 9.1 is a block diagram of the WDT.
WDT Standby cancellation Standby mode Peripheral clock (P) Internal reset request Reset control Clock selection Clock selector Interrupt request Interrupt control WTCSR Overflow Clock Divider
Standby control
WTCNT
Bus interface
[Legend] WTCSR: WTCNT: Watchdog timer control/status register Watchdog timer counter
Figure 9.1 Block Diagram of WDT
Rev. 6.00 Jul. 15, 2009 Page 216 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
9.2
Register Descriptions
The WDT has the following two registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * Watchdog timer counter (WTCNT) * Watchdog timer control/status register (WTCSR) 9.2.1 Watchdog Timer Counter (WTCNT)
WTCNT is an 8-bit readable/writable register that increments on the selected clock. When an overflow occurs, it generates a reset in watchdog timer mode and an interrupt in interval time mode. WTCNT is not initialized by an internal power-on reset due to the WDT overflow. WTCNT is initialized to H'00 by a power-on reset input to the pin and an H-UDI reset. Use a word access to write to WTCNT, with H'5A in the upper byte. Use a byte access to read WTCNT. Note: The writing method for WTCNT differs from other registers so that the WTCNT value cannot be changed accidentally. For details, see section 9.2.3, Notes on Register Access. 9.2.2 Watchdog Timer Control/Status Register (WTCSR)
WTCSR is an 8-bit readable/writable register composed of bits to select the clock used for the counting, bits to select the timer mode and overflow flags, and enable bits. WTCSR holds its value in the internal reset state due to the WDT overflow. WTCSR is initialized to H'00 by a power-on reset input to the pin and an H-UDI reset. To use it for counting the clock settling time when leaving software standby mode, WTCSR holds its value after a counter overflow. Use a word access to write to WTCSR, with H'A5 in the upper byte. Use a byte access to read WTCSR. Note: The writing method for WTCNT differs from other registers so that the WTCNT value cannot be changed accidentally. For details, see section 9.2.3, Notes on Register Access.
Rev. 6.00 Jul. 15, 2009 Page 217 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
Bit 7
Initial Bit Name Value TME 0
R/W R/W
Description Timer Enable Starts and stops timer operation. Clear this bit to 0 when using the WDT in software standby mode or when changing the clock frequency. 0: Timer disabled: Count-up stops and WTCNT value is retained 1: Timer enabled
6
WT/IT
0
R/W
Timer Mode Select Selects whether to use the WDT as a watchdog timer or an interval timer. 0: Interval timer mode 1: Watchdog timer mode Note: If WT/IT is modified when the WDT is operating, the up-count may not be performed correctly.
5
0
R
Reserved This bit is always red as 0. The write value should always be 0.
4
WOVF
0
R/W
Watchdog Timer Overflow Indicates that WTCNT has overflowed in watchdog timer mode. This bit is not set in interval timer mode. 0: No overflow 1: WTCNT has overflowed in watchdog timer mode
3
IOVF
0
R/W
Interval Timer Overflow Indicates that WTCNT has overflowed in interval timer mode. This bit is not set in watchdog timer mode. 0: No overflow 1: WTCNT has overflowed in interval timer mode
Rev. 6.00 Jul. 15, 2009 Page 218 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
Bit 2 1 0
Initial Bit Name Value CKS2 CKS1 CKS0 0 0 0
R/W R/W R/W R/W
Description Clock Select 2 to 0 These bits select the clock to be used for the WTCNT count from the eight types obtainable by dividing the peripheral clock (P). The overflow period that is shown inside the parenthesis in the table is the value when the peripheral clock (P) is 25 MHz. 000: P (10 s) 001: P /4 (41 s) 010: P /16 (164 s) 011: P /32 (328 s) 100: P /64 (655 s) 101: P /256 (2.62 ms) 110: P /1024 (10.49 ms) 111: P /4096 (41.94 ms) Note: If bits CKS2 to CKS0 are modified when the WDT is operating, the up-count may not be performed correctly. Ensure that these bits are modified only when the WDT is not operating.
9.2.3
Notes on Register Access
The watchdog timer counter (WTCNT) and watchdog timer control/status register (WTCSR) are more difficult to write to than other registers. The procedure for writing to these registers is given below. Writing to WTCNT and WTCSR: These registers must be written by a word transfer instruction. They cannot be written by a byte or longword transfer instruction. When writing to WTCNT, set the upper byte to H'5A and transfer the lower byte as the write data, as shown in figure 9.2. When writing to WTCSR, set the upper byte to H'A5 and transfer the lower byte as the write data. This transfer procedure writes the lower byte data to WTCNT or WTCSR.
Rev. 6.00 Jul. 15, 2009 Page 219 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
WTCNT write
15 8 H'5A 7 Write data 0
Address: H'F815FF84
WTCSR write 15 Address: H'F815FF86 H'A5 8 7 Write data 0
Figure 9.2 Writing to WTCNT and WTCSR
9.3
9.3.1
WDT Operation
Canceling Software Standbys
The WDT can be used to cancel software standby mode with an NMI interrupt or external interrupt (IRQ). The procedure is described below. (The WDT does not run when resets are used for canceling, so keep the RES pin low until the clock stabilizes.) 1. Before transition to software standby mode, always clear the TME bit in WTCSR to 0. When the TME bit is 1, an erroneous reset or interval timer interrupt may be generated when the count overflows. 2. Set the type of count clock used in the CKS2 to CKS0 bits in WTCSR and the initial values for the counter in WTCNT. These values should ensure that the time till count overflow is longer than the clock oscillation settling time. 3. Move to software standby mode by executing a SLEEP instruction to stop the clock. 4. The WDT starts counting by detecting the change of input levels of the NMI or IRQ pin. 5. When the WDT count overflows, the CPG starts supplying the clock and the processor resumes operation. The WOVF flag in WTCSR is not set when this happens. 6. Since the WDT continues counting from H'00, set the STBY bit in STBCR to 0 in the interrupt processing program and this will stop the WDT to count. When the STBY bit remains 1, the LSI again enters software standby mode when the WDT has counted up to H'80. This software standby mode can be canceled by a power-on reset.
Rev. 6.00 Jul. 15, 2009 Page 220 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
9.3.2
Changing Frequency
To change the multiplication ratio of PLL circuit 1, use the WDT. When changing the frequency only by switching the divider, do not use the WDT. 1. Before changing the frequency, always clear the TME bit in WTCSR to 0. When the TME bit is 1, an erroneous reset or interval timer interrupt may be generated when the count overflows. 2. Set the type of count clock used in the CKS2 to CKS0 bits in WTCSR and the initial values for the counter in WTCNT. These values should ensure that the time till count overflow is longer than the clock oscillation settling time. 3. When bits STC2 to STC0 in the frequency control register (FRQCR) is written, the processor stops temporarily. The WDT starts counting. 4. When the WDT count overflows, the CPG resumes supplying the clock and the processor resumes operation. The WOVF flag in WTCSR is not set when this happens. 5. WTCNT stops at the value of H'00. 6. Before changing WTCNT after the execution of the frequency change instruction, always confirm that the value of WTCNT is H'00 by reading WTCNT. 9.3.3 Using Watchdog Timer Mode
1. Set the WT/IT bit in WTCSR to 1, set the type of count clock in bits CKS2 to CKS0, and set the initial value of the counter in WTCNT. 2. Set the TME bit in WTCSR to 1 to start the count in watchdog timer mode. 3. While operating in watchdog timer mode, rewrite the counter periodically to H'00 to prevent the counter from overflowing. 4. When the counter overflows, the WDT sets the WOVF flag in WTCSR to 1 and generates a power-on reset. WTCNT then resumes counting.
Rev. 6.00 Jul. 15, 2009 Page 221 of 816 REJ09B0237-0600
Section 9 Watchdog Timer (WDT)
9.3.4
Using Interval Timer Mode
When operating in interval timer mode, interval timer interrupts are generated at every overflow of the counter. This enables interrupts to be generated at set periods. 1. Clear the WT/IT bit in WTCSR to 0, set the type of count clock in the CKS2 to CKS0 bits, and set the initial value of the counter in WTCNT. 2. Set the TME bit in WTCSR to 1 to start the count in interval timer mode. 3. When the WTCNT overflows, the WDT sets the IOVF flag in WTCSR to 1 and an interval timer interrupt request is sent to the INTC. The WTCNT then resumes counting.
9.4
Usage Notes
Pay attention to the following points when using the WDT. While using the WDT in interval mode, no overflow occurs by the H'00 immediately after writing H'FF to WDTCNT. (IOVF in WTCSR is not set.) The overflow occurs at the point when the count reaches H'00 after one cycle. This phenomenon does not occur when the WDT is used in watchdog timer mode.
Rev. 6.00 Jul. 15, 2009 Page 222 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
Section 10 Power-Down Modes
This LSI supports the following power-down modes: sleep mode, software standby mode, module standby mode.
10.1
Features
* Supports sleep mode, software standby mode, and module standby 10.1.1 Types of Power-Down Modes
This LSI has the following power-down modes. * Sleep mode * Software standby mode * Module standby mode (cache, U-memory, UBC, H-UDI, and on-chip peripheral modules) Table 10.1 shows the methods to make a transition from the program execution state, as well as the CPU and peripheral module states in each mode and the procedures for canceling each mode. Table 10.1 States of Power-Down Modes
State CPU Register Held On-Chip Memory Halts (contents remained) On-Chip Peripheral Modules Run Canceling Procedure * Interrupt other than user break * Halts Held Halts (contents remained) Specified module halts (contents remained) Halt Held * * Reset NMI, IRQ Reset
Mode Sleep
Transition Method CPG Execute SLEEP Runs instruction with STBY bit in STBCR cleared to 0.
CPU Halts
Pins Held
Software Execute SLEEP Halts standby instruction with STBY bit in STBCR set to 1. Module standby Set MSTP bits in STBCR2 to STBCR4 to 1. Runs
Runs
Held
Specified module halts
Held
* *
Clear MSTP bit to 0 Power-on reset
Rev. 6.00 Jul. 15, 2009 Page 223 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
10.2
Input/Output Pins
Table 10.2 lists the pins used for the power-down modes. Table 10.2 Pin Configuration
Pin Name Reset input pin Abbr. RES I/O Input Description Reset input signal. Reset by low level.
10.3
Register Descriptions
There are following registers used for the power-down modes. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * * * * Standby control register (STBCR) Standby control register 2 (STBCR2) Standby control register 3 (STBCR3) Standby control register 4 (STBCR4)
Rev. 6.00 Jul. 15, 2009 Page 224 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
10.3.1
Standby Control Register (STBCR)
STBCR is an 8-bit readable/writable register that specifies the state of the power-down mode.
Bit 7 Bit Name STBY Initial Value 0 R/W R/W Description Standby Specifies transition to software standby mode. 0: Executing SLEEP instruction makes this LSI sleep mode 1: Executing SLEEP instruction makes this LSI software standby mode 6 to 4 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 3 MDCHG 0 R/W MD2 to MD0 Pin Control Specifies whether or not the values of pins MD2 to MD0 are reflected in software standby mode. The values of pins MD2 to MD0 are reflected at returning from software standby mode by an interrupt when the MDCHG bit has been set to 1. 0: The values of pins MD2 to MO0 are not reflected in software standby mode. 1: The values of pins MD2 to MD0 are reflected in software standby mode. 2 to 0 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 225 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
10.3.2
Standby Control Register 2 (STBCR2)
STBCR2 is an 8-bit readable/writable register that controls the operation of modules in powerdown mode.
Bit 7 Bit Name MSTP10 Initial Value 0 R/W R/W Description Module Stop Bit 10 When this bit is set to 1, the supply of the clock to the H-UDI is halted. 0: H-UDI operates 1: Clock supply to H-UDI halted 6 MSTP9 0 R/W Module Stop Bit 9 When this bit is set to 1, the supply of the clock to the UBC is halted. 0: UBC operates 1: Clock supply to UBC halted 5 MSTP8 0 R/W Module Stop Bit 8 When this bit is set to 1, the supply of the clock to the DMAC is halted. 0: DMAC operates 1: Clock supply to DMAC halted 4, 3 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 2 MSTP5 0 R/W Module Stop Bit 5 When this bit is set to 1, the supply of the clock to the cache memory is halted. 0: Cache memory operates 1: Clock supply to cache memory halted 1 MSTP4 0 R/W Module Stop Bit 4 When this bit is set to 1, the supply of the clock to the U memory is halted. 0: U memory operates 1: Clock supply to the U memory halted
Rev. 6.00 Jul. 15, 2009 Page 226 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
Bit 0
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
10.3.3
Standby Control Register 3 (STBCR3)
STBCR3 is an 8-bit readable/writable register that controls the operation of modules in powerdown mode.
Bit 7 to 5 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 MSTP15 0 R/W Module Stop Bit 15 When this bit is set to 1, the supply of the clock to the CMT is halted. 0: CMT operates 1: Clock supply to CMT halted 3 0 R Reserved This bit is always read as 0. The write value should always be 0. 2 MSTP13 0 R/W Module Stop Bit 13 When this bit is set to 1, the supply of the clock to the SCIF2 is halted. 0: SCIF2 operates 1: Clock supply to SCIF2 halted 1 MSTP12 0 R/W Module Stop Bit 12 When this bit is set to 1, the supply of the clock to the SCIF1 is halted. 0: SCIF1 operates 1: Clock supply to SCIF1 halted
Rev. 6.00 Jul. 15, 2009 Page 227 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
Bit 0
Bit Name MSTP11
Initial Value 0
R/W R/W
Description Module Stop Bit 11 When this bit is set to 1, the supply of the clock to the SCIF0 is halted. 0: SCIF0 operates 1: Clock supply to SCIF0 halted
10.3.4
Standby Control Register 4 (STBCR4)
STBCR4 is an 8-bit readable/writable register that controls the operation of modules in powerdown mode.
Bit 7 to 5 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 MSTP23 0 R/W Module Stop Bit 23 When this bit is set to 1, the supply of the clock to the HIF is halted. 0: HIF operates 1: Clock supply to HIF halted 3 0 R Reserved This bit is always read as 0. The write value should always be 0. 2 MSTP21 0 R/W Module Stop Bit 21 When this bit is set to 1, the supply of the clock to the SIOF is halted. 0: SIOF operates 1: Clock supply to SIOF halted 1 MSTP20 0 R/W Module Stop Bit 20 When this bit is set to 1, the supply of the clock to the PHY is halted. 0: PHY-IF operates 1: Clock supply to PHY-IF halted
Rev. 6.00 Jul. 15, 2009 Page 228 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
Bit 0
Bit Name MSTP19
Initial Value 0
R/W R/W
Description Module Stop Bit 19 When this bit is set to 1, the supply of the clock to the EtherC and E-DMAC is halted. 0: EtherC and E-DMAC operate 1: Clock supply to EtherC and E-DMAC halted
10.4
10.4.1
Sleep Mode
Transition to Sleep Mode
Executing the SLEEP instruction when the STBY bit in STBCR is 0 causes a transition from the program execution state to sleep mode. Although the CPU halts immediately after executing the SLEEP instruction, the contents of its internal registers remain unchanged. The on-chip peripheral modules continue to operate in sleep mode and the clock continues to be output to the CKIO pin. 10.4.2 Canceling Sleep Mode
Sleep mode is canceled by an interrupt other than a user break (NMI, H-UDI, IRQ, and on-chip peripheral module) or a reset. Canceling with Interrupt: When a user-break, NMI, H-UDI, IRQ, or on-chip peripheral module interrupt occurs, sleep mode is canceled and interrupt exception handling is executed. When the priority level of an IRQ or on-chip peripheral module interrupt is lower than the interrupt mask level set in the status register (SR) of the CPU, an interrupt request is not accepted preventing sleep mode from being canceled. Canceling with Reset: Sleep mode is canceled by a power-on reset or an H-UDI reset.
Rev. 6.00 Jul. 15, 2009 Page 229 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
10.5
10.5.1
Software Standby Mode
Transition to Software Standby Mode
This LSI switches from a program execution state to software standby mode by executing the SLEEP instruction when the STBY bit in STBCR is 1. In software standby mode, not only the CPU but also the clock and on-chip peripheral modules halt. The clock output from the CKIO pin also halts. The contents of the CPU and cache registers remain unchanged. Some registers of on-chip peripheral modules are, however, initialized. Table 10.3 lists the states of on-chip peripheral modules registers in software standby mode. Table 10.3 Register States in Software Standby Mode
Module Interrupt controller (INTC) Clock pulse generator (CPG) User break controller (UBC) Bus state controller (BSC) Direct memory access controller (DMAC) Ethernet controller (EtherC) Direct memory access controller for Ethernet controller (E-DMAC) I/O port User debugging interface (H-UDI) Serial communication interface with FIFO (SCIF0 to SCIF2) Compare match timer (CMT0 and CMT1) Host interface (HIF) Serial IO with FIFO (SIOF) Ethernet physical layer transceiver (PHY) Note: * Registers Initialized All registers Some registers* Registers Retaining Data All registers All registers All registers All registers All registers All registers All registers All registers All registers All registers All registers All registers Some registers*
For details, see section 22, Ethernet Physical Layer Transceiver (PHY).
Rev. 6.00 Jul. 15, 2009 Page 230 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
The procedure for switching to software standby mode is as follows: 1. Clear the TME bit in the timer control register (WTCSR) of the WDT to 0 to stop the WDT. 2. Set the timer counter (WTCNT) of the WDT to 0 and bits CKS2 to CKS0 in WTCSR to appropriate values to secure the specified oscillation settling time. 3. After setting the STBY bit in STBCR to 1, execute the SLEEP instruction. 4. Software standby mode is entered and the clocks within this LSI are halted. 10.5.2 Canceling Software Standby Mode
Software standby mode is canceled by interrupts (NMI, IRQ) or a reset. Canceling with Interrupt: The WDT can be used for hot starts. When an NMI or IRQ interrupt is detected, the clock will be supplied to the entire LSI and software standby mode will be canceled after the time set in the timer control/status register of the WDT has elapsed. Interrupt exception handling is then executed. After the branch to the interrupt handling routine, clear the STBY bit in STBCR. WTCNT stops automatically. If the STBY bit is not cleared, WTCNT continues operation and a transition is made to software standby mode* when it reaches H'80. This function prevents data destruction due to the voltage rise by an unstable power supply voltage. IRQ cancels the software standby mode when the input condition matches the specified detect condition while the IRQn1S and IRQn0S bits in IRQCR are not B'00 (settings other than the low level detection). When the priority level of an IRQ interrupt is lower than the interrupt mask level set in the status register (SR) of the CPU, the execution of the instruction following the SLEEP instruction starts again after the cancellation of software standby mode. When the priority level of an IRQ interrupt is higher than the interrupt mask level set in the status register (SR) of the CPU, IRQ interrupt exception handling is executed after the cancellation of software standby mode. Note: * This software standby mode can be canceled only by a power-on reset.
Rev. 6.00 Jul. 15, 2009 Page 231 of 816 REJ09B0237-0600
Section 10 Power-Down Modes
Interrupt request Crystal oscillator settling time and PLL synchronization time WTCNT value
WDT overflow and branch to interrupt handling routine Clear bit STBCR.STBY before WTCNT reaches H'80. When STBCR.STBY is cleared, WTCNT halts automatically.
H'FF
H'80
Time
Figure 10.1 Canceling Standby Mode with STBY Bit in STBCR Canceling with Reset: Software standby mode is canceled by a power-on reset. Keep the RES pin low until the clock oscillation settles. The internal clock will continue to be output to the CKIO pin.
10.6
10.6.1
Module Standby Mode
Transition to Module Standby Mode
Setting the MSTP bits in the standby control registers (STBCR2 to STBCR4) to 1 halts the supply of clocks to the corresponding on-chip peripheral modules. This function can be used to reduce the power consumption in normal mode. In module standby mode, the states of the external pins of the on-chip peripheral modules change depending on the on-chip peripheral module and port settings. Almost all of the registers retain its previous state. 10.6.2 Canceling Module Standby Function
The module standby function can be canceled by clearing the MSTP bits in STBCR2 to STBCR4 to 0, or by a power-on reset.
Rev. 6.00 Jul. 15, 2009 Page 232 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Section 11 Ethernet Controller (EtherC)
This LSI has an on-chip Ethernet controller (EtherC) conforming to the Ethernet or the IEEE802.3 MAC (Media Access Control) layer standard. Connecting a physical-layer LSI (PHY-LSI) complying with this standard enables the Ethernet controller (EtherC) to perform transmission and reception of Ethernet/IEEE802.3 frames. This LSI has one MAC layer interface. The Ethernet controller is connected to the direct memory access controller for Ethernet controller (E-DMAC) inside this LSI, and carries out high-speed data transfer to and from the memory. Figure 11.1 shows a configuration of the EtherC.
11.1
* * * * * *
Features
Transmission and reception of Ethernet/IEEE802.3 frames Supports 10/100 Mbps receive/transfer Supports full-duplex and half-duplex modes Conforms to IEEE802.3u standard MII (Media Independent Interface) Magic Packet detection and Wake-On-LAN (WOL) signal output Conforms to IEEE802.3x flow control
Rev. 6.00 Jul. 15, 2009 Page 233 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
E-DMAC
EtherC E-DMAC interface
MAC Transmit controller Receive controller
Command status interface
MII
PHY
Figure 11.1 Configuration of EtherC
Rev. 6.00 Jul. 15, 2009 Page 234 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.2
Input/Output Pins
Table 11.1 lists the pin configuration of the EtherC. Table 11.1 Pin Configuration
Port 0 Abbreviation I/O TX-CLK* Input Function Transmit Clock Timing reference signal for the TX-EN, MII_TXD3 to MII_TXD0, TX-ER signals 0 RX-CLK* Input Receive Clock Timing reference signal for the RX-DV, MII_RXD3 to MII_RXD0, RX-ER signals 0 TX-EN* Output Transmit Enable Indicates that transmit data is ready on pins MII_TXD3 to MII_TXD0. 0 0 0 MII_TXD3 to MII_TXD0* TX-ER* RX-DV* Output Output Input Transmit Data 4-bit transmit data Transmit Error Notifies the PHY-LSI of error during transmission Receive Data Valid Indicates that valid receive data is on pins MII_RXD3 to MII_RXD0. 0 0 0 0 0 0 MII_RXD3 to MII_RXD0* RX-ER* CRS COL MDC MDIO Input Input Input Input Output Input/ Output Receive Data 4-bit receive data Receive Error Identifies error state occurred during data reception. Carrier Detection Carrier detection signal Collision Detection Collision detection signal Management Data Clock Reference clock signal for information transfer via MDIO Management Data I/O Bidirectional signal for exchange of management information between this LSI and PHY
Rev. 6.00 Jul. 15, 2009 Page 235 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Port 0 0 0 Note:
Abbreviation I/O LNKSTA EXOUT WOL * Input Output Output
Function Link Status Inputs link status from PHY General-Purpose External Output Signal indicating value of register-bit (ECMR0-ELB) Wake-On-LAN Signal indicating reception of Magic Packet
MII signal conforming to IEEE802.3u
Rev. 6.00 Jul. 15, 2009 Page 236 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3
Register Description
The EtherC has the following registers. For details on addresses and access sizes of registers, see section 24, List of Registers. MAC Layer Interface Control Registers: * EtherC mode register (ECMR) * EtherC status register (ECSR) * EtherC interrupt permission register (ECSIPR) * PHY interface register (PIR) * MAC address high register (MAHR) * MAC address low register (MALR) * Receive frame length register (RFLR) * PHY status register (PSR) * Transmit retry over counter register (TROCR) * Delayed collision detect counter register (CDCR) * Lost carrier counter register (LCCR) * Carrier not detect counter register (CNDCR) * CRC error frame counter register (CEFCR) * Frame receive error counter register (FRECR) * Too-short frame receive counter register (TSFRCR) * Too-long frame receive counter register (TLFRCR) * Residual-bit frame counter register (RFCR) * Multicast address frame counter register (MAFCR) * IPG register (IPGR) * Automatic PAUSE frame set register (APR) * Manual PAUSE frame set register (MPR) * PAUSE frame retransfer count set register (TPAUSER)
Rev. 6.00 Jul. 15, 2009 Page 237 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.1
EtherC Mode Register (ECMR)
ECMR is a 32-bit readable/writable register and specifies the operating mode of the Ethernet controller. The settings in this register are normally made in the initialization process following a reset. The operating mode setting must not be changed while the transmitting and receiving functions are enabled. To switch the operating mode, return the EtherC and E-DMAC to their initial states by means of the SWR bit in EDMR before making settings again.
Bit 31 to 20 Initial Bit Name Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 19 ZPF 0 R/W 0 time parameter PAUSE Frame Use Enable 0: Disables PAUSE frame control in which the TIME parameter is 0. The next frame is transmitted after the time indicated by the Timer value has elapsed. When the EtherC receives a PAUSE frame with the time indicated by the Timer value set to 0, the PAUSE frame is discarded. 1: Enables PAUSE frame control in which the TIME parameter is 0. A PAUSE frame with the Timer value set to 0 is transmitted when the number of data in the receive FIFO is less than the FCFTR value before the time indicated by the Timer value has not elapsed. When the EtherC receives a PAUSE frame with the time indicated by the Timer value set to 0, the transmit wait state is canceled. 18 PFR 0 R/W PAUSE Frame Receive Mode 0: PAUSE frame is not transferred to the E-DMAC 1: PAUSE frame is transferred to the E-DMAC 17 RXF 0 R/W Receive Flow Control Operating Mode 0: PAUSE frame detection function is disabled 1: Receive flow control function is enabled
Rev. 6.00 Jul. 15, 2009 Page 238 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Bit 16
Initial Bit Name Value TXF 0
R/W R/W
Description Transmit Flow Control Operating mode 0: Transmit flow control function is disabled 1: Transmit flow control function is enabled
15 to 13
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
12
PRCEF
0
R/W
Permit Receive CRC Error Frame 0: A frame with a CRC error is received as a frame with an error. 1: A frame with a CRC error is received as a frame without an error. For a frame with an error, a CRC error is reflected in the ECSR of the E-DMAC and the status of the receive descriptor. For a frame without an error, the frame is received as normal frame.
11, 10
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
9
MPDE
0
R/W
Magic Packet Detection Enable Enables or disables Magic Packet detection by hardware to allow activation from the Ethernet. 0: Magic Packet detection is not enabled 1: Magic Packet detection is enabled
8, 7
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
6
RE
0
R/W
Reception Enable If a frame is being received when this bit is switched from receive function enabled (RE = 1) to disabled (RE = 0), the receive function will be enabled until reception of the corresponding frame is completed. 0: Receive function is disabled 1: Receive function is enabled
Rev. 6.00 Jul. 15, 2009 Page 239 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Bit 5
Initial Bit Name Value TE 0
R/W R/W
Description Transmission Enable If a frame is being transmitted when this bit is switched from transmit function enabled (TE = 1) to disabled (TE = 0), the transmit function will be enabled until transmission of the corresponding frame is completed. 0: Transmit function is disabled 1: Transmit function is enabled
4
0
R
Reserved This bit is always read as 0. The write value should always be 0.
3
ILB
0
R/W
Internal Loop Back Mode Specifies loopback mode in the EtherC. 0: Normal data transmission/reception is performed. 1: When DM = 1, data loopback is performed inside the MAC in the EtherC.
2
ELB
0
R/W
External Loop Back Mode This bit value is output directly to this LSI's generalpurpose external output pin (EXOUT). This bit is used for loopback mode directives, etc., in the LSI, using the EXOUT pin. In order for LSI loopback to be implemented using this function, the LSI must have a pin corresponding to the EXOUT pin. 0: Low-level output from the EXOUT pin 1: High-level output from the EXOUT pin
1
DM
0
R/W
Duplex Mode Specifies the EtherC transfer method. 0: Half-duplex transfer is specified 1: Full-duplex transfer is specified
Rev. 6.00 Jul. 15, 2009 Page 240 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Bit 0
Initial Bit Name Value PRM 0
R/W R/W
Description Promiscuous Mode Setting this bit enables all Ethernet frames to be received. All Ethernet frames means all receivable frames, irrespective of differences or enabled/disabled status (destination address, broadcast address, multicast bit, etc.). 0: EtherC performs normal operation 1: EtherC performs promiscuous mode operation
11.3.2
EtherC Status Register (ECSR)
ECSR is a 32-bit readable/writable register and indicates the status in the EtherC. This status can be notified to the CPU by interrupts. When 1 is written to the PSRTO, LCHNG, MPD, and ICD, the corresponding flags can be cleared. Writing 0 does not affect the flag. For bits that generate interrupt, the interrupt can be enabled or disabled according to the corresponding bit in ECSIPR. The interrupts generated due to this status register are indicated in the ECI bit in EESR.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 PSRTO 0 R/W PAUSE Frame Retransfer Retry Over Indicates that during the retransfer of PAUSE frames when the flow control is enabled, the number of retries has exceeded the upper limit set in the automatic PAUSE frame retransfer count set register (TPAUSER). 0: Number of PAUSE frame retransfers has not exceeded the upper limit 1: Number of PAUSE frame retransfers has exceeded the upper limit 3 0 R Reserved This bit is always read as 0. The write value should always be 0.
31 to 5
Rev. 6.00 Jul. 15, 2009 Page 241 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Bit 2
Bit Name LCHNG
Initial Value 0
R/W R/W
Description Link Signal Change Indicates that the LNKSTA signal input from the PHY has changed from high to low or low to high. To check the current Link state, refer to the LMON bit in the PHY status register (PSR). 0: Changes in the LNKSTA signal are not detected 1: Changes in the LNKSTA signal are detected (high to low or low to high)
1
MPD
0
R/W
Magic Packet Detection Indicates that a Magic Packet has been detected on the line. 0: Magic Packet has not been detected 1: Magic Packet has been detected
0
ICD
0
R/W
Illegal Carrier Detection Indicates that the PHY has detected an illegal carrier on the line. If a change in the signal input from the PHY occurs before the software recognition period, the correct information may not be obtained. Refer to the timing specification for the PHY used. 0: LSI has not detected an illegal carrier on the line 1: LSI has detected an illegal carrier on the line
Rev. 6.00 Jul. 15, 2009 Page 242 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.3
EtherC Interrupt Permission Register (ECSIPR)
ECSIPR is a 32-bit readable/writable register that enables or disables the interrupt sources indicated by ECSR. Each bit can disable or enable interrupts corresponding to the bits in ECSR.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 PSRTOIP 0 R/W PAUSE Frame Retransfer Retry Over Interrupt Enable 0: Interrupt notification by the PSRTO bit is disabled 1: Interrupt notification by the PSRTO bit is enabled 3 -- 0 R Reserved This bit is always read as 0. The write value should always be 0. 2 LCHNGIP 0 R/W LINK Signal Changed Interrupt Enable 0: Interrupt notification by the LCHNG bit is disabled 1: Interrupt notification by the LCHNG bit is enabled 1 MPDIP 0 R/W Magic Packet Detection Interrupt Enable 0: Interrupt notification by the MPD bit is disabled 1: Interrupt notification by the MPD bit is enabled 0 ICDIP 0 R/W Illegal Carrier Detection Interrupt Enable 0: Interrupt notification by the ICD bit is disabled 1: Interrupt notification by the ICD bit is enabled
31 to 5
Rev. 6.00 Jul. 15, 2009 Page 243 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.4
PHY Interface Register (PIR)
PIR is a 32-bit readable/writable register that provides a means of accessing the PHY registers via the MII.
Bit Bit Name Initial Value All 0 R/W Description R Reserved These bits are always read as 0. The write value should always be 0. 3 2 MDI MDO Undefined R 0 MII Management Data-In Indicates the level of the MDIO pin. R/W MII Management Data-Out Outputs the value set to this bit from the MDIO pin, when the MMD bit is 1. 1 MMD 0 R/W MII Management Mode Specifies the data read/write direction with respect to the MII. 0: Read direction is indicated 1: Write direction is indicated 0 MDC 0 R/W MII Management Data Clock Outputs the value set to this bit from the MDC pin and supplies the MII with the management data clock. For the method of accessing the MII registers, see section 11.4.4, Accessing MII Registers.
31 to 4
Rev. 6.00 Jul. 15, 2009 Page 244 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.5
MAC Address High Register (MAHR)
MAHR is a 32 -bit readable/writable register that specifies the upper 32 bits of the 48-bit MAC address. The settings in this register are normally made in the initialization process after a reset. The MAC address setting must not be changed while the transmitting and receiving functions are enabled. To switch the MAC address setting, return the EtherC and E-DMAC to their initial states by means of the SWR bit in EDMR before making settings again.
Bit Bit Name Initial Value All 0 R/W R/W Description MAC Address Bits These bits are used to set the upper 32 bits of the MAC address. If the MAC address is 01-23-45-67-89-AB (hexadecimal), the value set in this register is H'01234567.
31 to 0 MA47 to MA16
11.3.6
MAC Address Low Register (MALR)
MALR is a 32-bit readable/writable register that specifies the lower 16 bits of the 48-bit MAC address. The settings in this register are normally made in the initialization process after a reset. The MAC address setting must not be changed while the transmitting and receiving functions are enabled. To switch the MAC address setting, return the EtherC and E-DMAC to their initial states by means of the SWR bit in EDMR before making settings again.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 MA15 to MA0 All 0 R/W MAC Address Bits 15 to 0 These bits are used to set the lower 16 bits of the MAC address. If the MAC address is 01-23-45-67-89-AB (hexadecimal), the value set in this register is H'000089AB.
31 to 16
Rev. 6.00 Jul. 15, 2009 Page 245 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.7
Receive Frame Length Register (RFLR)
RFLR is a 32-bit readable/writable register and it specifies the maximum frame length (in bytes) that can be received by this LSI. The settings in this register must not be changed while the receiving function is enabled.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 11 to 0 RFL11 to RFL0 All 0 R/W Receive Frame Length 11 to 0 The frame length described here refers to all fields from the destination address up to and including the CRC data. Frame contents from the destination address up to and including the data are actually transferred to memory. CRC data is not included in the transfer. When data that exceeds the specified value is received, the part of the data that exceeds the specified value is discarded. H'000 to H'5EE: 1,518 bytes H'5EF: 1,519 bytes H'5F0: 1,520 bytes : : H'7FF: 2,047 bytes H'800 to H'FFF: 2,048 bytes
31 to 12
Rev. 6.00 Jul. 15, 2009 Page 246 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.8
PHY Status Register (PSR)
PSR is a read-only register that can read interface signals from the PHY.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 LMON 0 R LNKSTA Pin Status The Link status can be read by connecting the Link signal output from the PHY to the LNKSTA pin. For the polarity, refer to the PHY specifications to be connected.
31 to 1
11.3.9
Transmit Retry Over Counter Register (TROCR)
TROCR is a 32-bit counter that indicates the number of frames that were unable to be transmitted in 16 transmission attempts including the retransfer. When 16 transmission attempts have failed, TROCR is incremented by 1. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Transmit Retry Over Count These bits indicate the number of frames that were unable to be transmitted in 16 transmission attempts including the retransfer.
31 to 0 TROC31 to TROC0
Rev. 6.00 Jul. 15, 2009 Page 247 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.10 Delayed Collision Detect Counter Register (CDCR) CDCR is a 32-bit counter that indicates the number of delayed collisions on all lines from a start of transmission. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Delayed Collision Detect Count These bits indicate the number of delayed collisions on all lines from a start of transmission.
31 to 0 COSDC31 to COSDC0
11.3.11 Lost Carrier Counter Register (LCCR) LCCR is a 32-bit counter that indicates the number of times the carrier was lost during data transmission. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by writing to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Lost Carrier Count These bits indicate the number of times the carrier was lost during data transmission.
31 to 0 LCC31 to LCC0
11.3.12 Carrier Not Detect Counter Register (CNDCR) CNDCR is a 32-bit counter that indicates the number of times the carrier could not be detected while the preamble was being sent. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Carrier Not Detect Count These bits indicate the number of times the carrier was not detected.
31 to 0 CNDC31 to CNDC0
Rev. 6.00 Jul. 15, 2009 Page 248 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.13 CRC Error Frame Counter Register (CEFCR) CEFCR is a 32-bit counter that indicates the number of times a frame with a CRC error was received. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description CRC Error Frame Count These bits indicate the count of CRC error frames received.
31 to 0 CEFC31 to CEFC0
11.3.14 Frame Receive Error Counter Register (FRECR) FRECR is a 32-bit counter that indicates the number of frames input from the PHY for which a receive error was indicated by the RX-ER pin. FRECR is incremented each time the RX-ER pin becomes active. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Frame Receive Error Count These bits indicate the count of errors during frame reception.
31 to 0 FREC31 to FREC0
11.3.15 Too-Short Frame Receive Counter Register (TSFRCR) TSFRCR is a 32-bit counter that indicates the number of frames of fewer than 64 bytes that have been received. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Too-Short Frame Receive Count These bits indicate the count of frames received with a length of less than 64 bytes.
31 to 0 TSFC31 to TSFC0
Rev. 6.00 Jul. 15, 2009 Page 249 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.16 Too-Long Frame Receive Counter Register (TLFRCR) TLFRCR is a 32-bit counter that indicates the number of frames received with a length exceeding the value specified by the receive frame length register (RFLR). When the value in this register reaches H'FFFFFFFF, the count is halted. TLFRCR is not incremented when a frame containing residual bits is received. In this case, the reception of the frame is indicated in the residual-bit frame counter register (RFCR). The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Too-Long Frame Receive Count These bits indicate the count of frames received with a length exceeding the value in RFLR.
31 to 0 TLFC31 to TLFC0
11.3.17 Residual-Bit Frame Counter Register (RFCR) RFCR is a 32-bit counter that indicates the number of frames received containing residual bits (less than an 8-bit unit). When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Residual-Bit Frame Count These bits indicate the count of frames received containing residual bits.
31 to 0 RFC31 to RFC0
11.3.18 Multicast Address Frame Counter Register (MAFCR) MAFCR is a 32-bit counter that indicates the number of frames received with a specified multicast address. When the value in this register reaches H'FFFFFFFF, the count is halted. The counter value is cleared to 0 by a write to this register with any value.
Bit Bit Name Initial Value All 0 R/W R/W Description Multicast Address Frame Count These bits indicate the count of multicast frames received.
31 to 0 MAFC31 to MAFC0
Rev. 6.00 Jul. 15, 2009 Page 250 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.19 IPG Register (IPGR) IPGR sets the IPG (Inter Packet Gap). This register must not be changed while the transmitting and receiving functions of the EtherC mode register (ECMR) are enabled. (For details, refer to section 11.4.6, Operation by IPG Setting.)
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 to 0 IPG4 to IPG0 H'13 R/W Inter Packet Gap Sets the IPG value every 4-bit time. H'00: 20-bit time H'01: 24-bit time : : : : H'13: 96-bit time (Initial value) H'1F: 144-bit time
31 to 5
11.3.20 Automatic PAUSE Frame Set Register (APR) APR sets the TIME parameter value of the automatic PAUSE frame. When transmitting the automatic PAUSE frame, the value set in this register is used as the TIME parameter of the PAUSE frame.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 AP15 to AP0 All 0 R/W Automatic PAUSE Sets the TIME parameter value of the automatic PAUSE frame. At this time, 1 bit means 512-bit time.
31 to 16
Rev. 6.00 Jul. 15, 2009 Page 251 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.3.21 Manual PAUSE Frame Set Register (MPR) MPR sets the TIME parameter value of the manual PAUSE frame. When transmitting the manual PAUSE frame, the value set to this register is used as the TIME parameter of the PAUSE frame.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 MP15 to MP0 All 0 R/W Manual PAUSE Sets the TIME parameter value of the manual PAUSE frame. At this time, 1 bit means 512-bit time. Read values are undefined.
31 to 16
11.3.22 PAUSE Frame Retransfer Count Set Register (TPAUSER) TPAUSER sets the upper limit of the number of times of the PAUSE frame retransfer. TPAUSER must not be changed while the transmitting function is enabled.
Bit 31 to 16 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 TPAUSE15 All 0 to TPAUSE0 R/W Upper Limit of the Number of Times of PAUSE Frame Retransfer H'0000: Unlimited number of times of retransfer H'0001: Retransfer once : : H'FFFF: Number of times of retransfer is 65535
Rev. 6.00 Jul. 15, 2009 Page 252 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.4
Operation
The overview of the Ethernet controller (EtherC) are shown below. The EtherC transmits and receives PAUSE frames conforming to the Ethernet/IEEE802.3x frames. 11.4.1 Transmission
The EtherC transmitter assembles the transmit data on the frame and outputs to MII when there is a transmit request from the E-DMAC. The data transmitted via the MII is transmitted to the lines by PHY-LSI. Figure 11.3 shows the state transition of the EtherC transmitter.
Rev. 6.00 Jul. 15, 2009 Page 253 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
TE set Idle
FDPX
Start of transmission (preamble transmission) Carrier non-detection Retransfer initiation Collision Carrier detection HDPX FDPX
Transmission halted
HDPX TE reset
Carrier detection
Carrier detection Reset
Retransfer processing*1 Failure of 15 retransfer attempts or collision after 512-bit time
Carrier non-detection Collision SFD transmission Error Collision*2
Error detection Error notification
Error
Data transmission Collision*2
Error [Legend] FDPX: Full Duplex CRC Normal transmission HDPX: Half Duplex transmission SFD: Start Frame Delimiter Notes: 1. Transmission retry processing includes both jam transmission that depends on collision detection and the adjustment of transmission intervals based on the back-off algorithm. 2. Transmission is retried only when data of 512 bits or less (including the preamble and SFD) is transmitted. When a collision is detected during the transmission of data greater than 512 bits, only jam is transmitted and transmission based on the back-off algorithm is not retried.
Figure 11.2 EtherC Transmitter State Transitions 1. When the transmit enable (TE) bit is set, the transmitter enters the transmit idle state. 2. When a transmit request is issued by the transmit E-DMAC, the EtherC sends the preamble after a transmission delay equivalent to the frame interval time. If full-duplex transfer is selected, which does not require carrier detection, the preamble is sent as soon as a transmit request is issued by the E-DMAC.
Rev. 6.00 Jul. 15, 2009 Page 254 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
3. The transmitter sends the SFD, data, and CRC sequentially. At the end of transmission, the transmit E-DMAC generates a transmission complete interrupt (TC). If a collision or the carrier-not-detected state occurs during data transmission, these are reported as interrupt sources. 4. After waiting for the frame interval time, the transmitter enters the idle state, and if there is more transmit data, continues transmitting. 11.4.2 Reception
The EtherC receiver separates the frame data (MII into preamble, SFD, DA (destination address), SA (Source address), type/length, Data, and CRC data) and outputs DA, SA, type/length, Data to the E-DMAC. Figure 11.3 shows the state transitions of the EtherC receiver.
Illegal carrier detection RX-DV negation
Idle RE set Preamble detection
Start of frame reception
Wait for SFD reception SFD reception Destination address reception Own destination address or broadcast or multicast or promiscuous Data reception End of reception CRC reception
Reception halted
RE reset Promiscuous and other station destination address
Reset
Error notification*
Error detection
Receive error detection
Receive error detection
Normal reception [Legend] SFD: Start frame delimiter Note: * The error frame also transmits data to the buffer.
Figure 11.3 EtherC Receiver State Transmissions
Rev. 6.00 Jul. 15, 2009 Page 255 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
1. When the receive enable (RE) bit is set, the receiver enters the receive idle state. 2. When an SFD (start frame delimiter) is detected after a receive packet preamble, the receiver starts receive processing. Discards a frame with an invalid pattern. 3. In normal mode, if the destination address matches the receiver's own address, or if broadcast or multicast transmission or promiscuous mode is specified, the receiver starts data reception. 4. Following data reception from the MII, the receiver carries out a CRC check. The result is indicated as a status bit in the descriptor after the frame data has been written to memory. Reports an error status in the case of an abnormality. 5. After one frame has been received, if the receive enable bit is set (RE = 1) in the EtherC mode register, the receiver prepares to receive the next frame. 11.4.3 MII Frame Timing
Each MII Frame timing is shown in figure 11.4.
TX-CLK TX-EN TXD3 to TXD0 TX-ER CRS COL Preamble SFD Data CRC
Figure 11.4 (1) MII Frame Transmit Timing (Normal Transmission)
TX-CLK TX-EN MII_TXD3 to MII_TXD0 TX-ER CRS COL Preamble JAM
Figure 11.4 (2) MII Frame Transmit Timing (Collision)
Rev. 6.00 Jul. 15, 2009 Page 256 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
TX-CLK TX-EN MII_TXD3 to MII_TXD0 TX-ER CRS COL Preamble SFD Data
Figure 11.4 (3) MII Frame Transmit Timing (Transmit Error)
RX-CLK RX-DV MII_RXD3 to MII_RXD0 RX-ER Preamble SFD Data CRC
Figure 11.4 (4) MII Frame Receive Timing (Normal Reception)
RX-CLK RX-DV MII_RXD3 to MII_RXD0 RX-ER Preamble SFD Data XXXX
Figure 11.4 (5) MII Frame Receive Timing (Reception Error (1))
RX-CLK RX-DV MII_RXD3 to MII_RXD0 RX-ER XXXX 1110 XXXX
Figure 11.4 (6) MII Fame Receive Timing (Reception Error (2))
Rev. 6.00 Jul. 15, 2009 Page 257 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.4.4
Accessing MII Registers
MII registers in the PHY are accessed via this LSI's PHY interface register (PIR). Connection is made as a serial interface in accordance with the MII frame format specified in IEEE802.3u. MII Management Frame Format: The format of an MII management frame is shown in figure 11.8. To access an MII register, a management frame is implemented by the program in accordance with the procedures shown in MII Register Access Procedure.
Access Type Item Number of bits Read Write [Legend] PRE: ST: OP: PHYAD: PRE 32 1..1 1..1 ST 2 01 01 OP 2 10 01 MII Management Frame PHYAD 5 00001 00001 REGAD 5 RRRRR RRRRR TA 2 Z0 10 DATA 16 D..D D..D X IDLE
32 consecutive 1s Write of 01 indicating start of frame Write of code indicating access type Write of 0001 if the PHY address is 1 (sequential write starting with the MSB). This bit changes depending on the PHY address. REGAD: Write of 0001 if the register address is 1 (sequential write starting with the MSB). This bit changes depending on the PHY register address. TA: Time for switching data transmission source on MII interface (a) Write: 10 written (b) Read: Bus release (notation: Z0) performed DATA: 16-bit data. Sequential write or read from MSB (a) Write: 16-bit data write (b) Read: 16-bit data read IDLE: Wait time until next MII management format input (a) Write: Independent bus release (notation: X) performed (b) Read: Bus already released in TA; data control unnecessary
Figure 11.5 MII Management Frame Format
Rev. 6.00 Jul. 15, 2009 Page 258 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
MII Register Access Procedure: The program accesses MII registers via the PHY interface register (PIR). Access is implemented by a combination of 1-bit-unit data write, 1-bit-unit data read, bus release, and independent bus release. Figure 11.9 shows the MII register access timing. The timing will differ depending on the PHY type.
(1) Write to PHY interface register MMD = 1 MDO = write data MDC = 0 MDC MDO
(2) Write to PHY interface register MMD = 1 MDO = write data MDC = 1
(1) (2)
(3)
1-bit data write timing relationship
(3) Write to PHY interface register MMD = 1 MDO = write data MDC = 0
Figure 11.6 (1) 1-Bit Data Write Flowchart
Rev. 6.00 Jul. 15, 2009 Page 259 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
(1)
Write to PHY interface register MMD = 0 MDC = 0 MDC MDO
(2)
Write to PHY interface register (1) (2) MMD = 0 MDC = 1 (3) Bus release timing relationship
(3)
Write to PHY interface register MMD = 0 MDC = 0
Figure 11.6 (2) Bus Release Flowchart (TA in Read in Figure 11.5)
(1) Write to PHY interface register MMD = 0 MDC = 1 MDC MDI (2) Read from PHY interface register read MMD = 0 MMC = 1 MDI is read data (1) (2) (3) 1-bit data read timing relationship
(3) Write to PHY interface register MMD = 0 MDC = 0
Figure 11.6 (3) 1-Bit Data Read Flowchart
Rev. 6.00 Jul. 15, 2009 Page 260 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
(1) Write to PHY interface register MMD = 0 MDC = 0 MDC MDO
(1) Independent bus release timing relationship
Figure 11.6 (4) Independent Bus Release Flowchart (IDLE in Write in Figure 11.5) 11.4.5 Magic Packet Detection
The EtherC has a Magic Packet detection function. This function provides a Wake-On-LAN (WOL) facility that activates various peripheral devices connected to a LAN from the host device or other source. This makes it possible to construct a system in which a peripheral device receives a Magic Packet sent from the host device or other source, and activates itself. When the Magic Packet is detected, data is stored in the FIFO of the E-DMAC by the broadcast packet that has received data previously and the EtherC is notified of the receiving status. To return to normal operation from the interrupt processing, initialize the EtherC and E-DMAC by using the SWR bit in the E-DMAC mode register (EDMR). With a Magic Packet, reception is performed regardless of the destination address. As a result, this function is valid, and the WOL pin enabled, only in the case of a match with the destination address specified by the format in the Magic Packet. Further information on Magic Packets can be found in the technical documentation published by AMD Corporation. The procedure for using the WOL function with this LSI is as follows. 1. Disable interrupt source output by means of the various interrupt enable/mask registers. 2. Set the Magic Packet detection enable bit (MPDE) in the EtherC mode register (ECMR). 3. Set the Magic Packet detection interrupt enable bit (MPDIP) in the EtherC interrupt enable register (ECSIPR) to the enable setting. 4. If necessary, set the CPU operating mode to sleep mode or set supporting functions to module standby mode. 5. When a Magic Packet is detected, an interrupt is sent to the CPU. The WOL pin notifies peripheral LSIs that the Magic Packet has been detected.
Rev. 6.00 Jul. 15, 2009 Page 261 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.4.6
Operation by IPG Setting
The EtherC has a function to change the non-transmission period IPG (Inter Packet Gap) between transmit frames. By changing the set values of the IPG setting register (IPGR), the transmission efficiency can be raised and lowered from the standard value. IPG settings are prescribed in IEEE802.3 standards. When changing settings, adequately check that the respective devices can operate smoothly on the same network.
Case A (short IPG)
[1]
[2]
[3]
[4]
[5]
......
Packet Case B (long IPG)
IPG*
[1]
[2]
[3]
[4]
......
Note: * IPG may be longer than the set value, depending on the state of the circuit and the system bus.
Figure 11.7 Changing IPG and Transmission Efficiency 11.4.7 Flow Control
The EtherC supports flow control functions conforming to IEEE802.3x in full-duplex operations. Flow control can be applied to both receive and transmit operations. The methods for transmitting PAUSE frames when controlling flow are as follows: Automatic PAUSE Frame Transmission: For receive frames, PAUSE frames are automatically transmitted when the number of data in the receive FIFO (included in E-DMAC) reaches the value set in the flow control FIFO threshold register (FCFTR) of the E-DMAC. The TIME parameter included in the PAUSE frame at this time is set by the automatic PAUSE frame setting register (APR). The automatic PAUSE frame transmission is repeated until the number of data in the receive FIFO becomes less than the FCFTR setting as the receive data is read from the FIFO. The upper limit of the number of retransfers of the PAUSE frame can also be set by the automatic PAUSE frame retransfer count set register (TPAUSER). In this case, PAUSE frame transmission is repeated until the number of data becomes FCFTR value set or below, or the number of transmits reaches the value set by TPAUSER. The automatic PAUSE frame transmission is enabled when the TXF bit in the EtherC mode register (ECMR) is 1.
Rev. 6.00 Jul. 15, 2009 Page 262 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Manual PAUSE Frame Transmission: PAUSE frames are transmitted by directives from the software. When writing the Timer value to the manual PAUSE frame set register (MPR), manual PAUSE frame transmission is started. With this method, PAUSE frame transmission is carried out only once. PAUSE Frame Reception: The next frame is not transmitted until the time indicated by the Timer value elapses after receiving a PAUSE frame. However, the transmission of the current frame is continued. A received PAUSE frame is valid only when the RXF bit in the EtherC mode register (ECMR) is set to 1.
11.5
Connection to PHY-LSI
Figure 11.8 shows the example of connection to a DP83846AVHG by National Semiconductor Corporation.
MII (Media Independent Interface) DP83846AVHG TXER TXD3 TXD2 TXD1 TXD0 TXEN TXCLK MDC MDIO RXD3 RXD2 RXD1 RXD0 RXCLK CRS COL RXDV RXER
This LSI
TX-ER MII_TXD3 MII_TXD2 MII_TXD1 MII_TXD0 TX-EN TX-CLK MDC MDIO MII_RXD3 MII_RXD2 MII_RXD1 MII_RXD0 RX-CLK CRS COL RX-DV RX-ER
Figure 11.8 Example of Connection to DP83846AVHG
Rev. 6.00 Jul. 15, 2009 Page 263 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
11.6
Usage Notes
* Conditions for Setting LCHNG Bit Even if the level of the signal input to the LNKSTA pin is not changed, the LCHNG bit in ECSR may be set. It may happen when the pin function is changed from port to LNKSTA by PCCRH2 of the PFC or when a software reset caused by the SWR bit in EDMR is cleared while the LNKSTA pin is being driven high. This is because the LNKSTA signal is internally fixed low when the pin functions as a port or during the software reset state regardless of the external pin level. Clear the LCHNG bit before setting the LCHNGIP bit in ECSIPR not to request a LINK signal changed interrupt accidentally. * Flow Control Defect 1 Once a PAUSE frame is received while the receiving flow control is enabled in full-duplex mode (the RXF bit in ECMR = 1), each time when the local station receives a normal unicast frame (non-PAUSE frame without a CRC error), the TIME parameter specified by the PAUSE frame that has been previously received is incorrectly applied. As a result, unnecessary waiting time is generated to slow down the transmission throughput. The TIME parameter value is maintained until another PAUSE frame is received. This defect can be prevented if the destination station supports the function to transmit the 0 time PAUSE frame as the same as this LSI does. Enable the use of 0 time PAUSE frame in this LSI (the ZPF bit in ECMR = 1) before the 0 time PAUSE frame is received from the destination station. This clears the TIME parameter incorrectly maintained in the EtherC and prevents the unnecessary waiting time for transmission to be generated. Note: This defect may be generated only in the R4S76190. In the R4S76191, the defect has been corrected.
Rev. 6.00 Jul. 15, 2009 Page 264 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
* Flow Control Defect 2 When a PAUSE period is generated while the transmitting/receiving flow control is enabled in full-duplex mode (the TXF/RXF bit in ECMR = 1), non-PAUSE frames are waited for transmission (this is a normal operation) whereas PAUSE frames are incorrectly waited for transmission. The transmission of non-PAUSE frames in a PAUSE period is prohibited, though the transmission of PAUSE frames is enabled in IEEE802.3. When a PAUSE period is generated by the request from the destination station (that is, a PAUSE frame is received from the destination station), the load of the destination station is high and that of the local station is not so high. Therefore, the transmission of PAUSE frames during this period is less likely to happen. The ratio that this defect actually affects the operation in this LSI is rather low. Note: This defect may be generated only in the R4S76190. In the R4S76191, the defect has been corrected.
Rev. 6.00 Jul. 15, 2009 Page 265 of 816 REJ09B0237-0600
Section 11 Ethernet Controller (EtherC)
Rev. 6.00 Jul. 15, 2009 Page 266 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
This LSI includes a direct memory access controller (E-DMAC) directly connected to the Ethernet controller (EtherC). A large proportion of buffer management is controlled by the E-DMAC itself using descriptors. This lightens the load on the CPU and enables efficient control of data transfer. Figure 12.1 shows the configuration of the E-DMAC, and the descriptors and transmit/receive buffers in memory.
12.1
Features
The E-DMAC has the following features: * * * * The load on the CPU is reduced by means of a descriptor management system Transmit/receive frame status information is indicated in descriptors Achieves efficient system bus utilization through the use of block transfer (16-byte units) Supports single-frame/multi-buffer operation
This LSI Internal bus Transmit buffer Transmit descriptor External bus interface
E-DMAC
Receive buffer Receive descriptor
Internal bus interface
Descriptor information Transmit DMAC Descriptor information Receive DMAC
Transmit FIFO
Receive FIFO
EtherC
External memory
Figure 12.1 Configuration of E-DMAC, and Descriptors and Buffers
Rev. 6.00 Jul. 15, 2009 Page 267 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2
Register Descriptions
The E-DMAC has the following registers. For addresses and access sizes of these registers, see section 24, List of Registers. * * * * * * * * * * * * * * * * * * * E-DMAC mode register (EDMR) E-DMAC transmit request register (EDTRR) E-DMAC receive request register (EDRRR) Transmit descriptor list address register (TDLAR) Receive descriptor list address register (RDLAR) EtherC/E-DMAC status register (EESR) EtherC/E-DMAC status interrupt permission register (EESIPR) Transmit/receive status copy enable register (TRSCER) Receive missed-frame counter register (RMFCR) Transmit FIFO threshold register (TFTR) FIFO depth register (FDR) Receiving method control register (RMCR) E-DMAC operation control register (EDOCR) Receive buffer write address register (RBWAR) Receive descriptor fetch address register (RDFAR) Transmit buffer read address register (TBRAR) Transmit descriptor fetch address register (TDFAR) Flow control FIFO threshold register (FCFTR) Transmit interrupt register (TRIMD)
Rev. 6.00 Jul. 15, 2009 Page 268 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.1
E-DMAC Mode Register (EDMR)
EDMR is a 32-bit readable/writable register that specifies the operating mode of the E-DMAC. The settings in this register are normally made in the initialization process following a reset. If the EtherC and E-DMAC are initialized by means of this register during data transmission, abnormal data may be sent onto the line. Operating mode settings must not be changed while the transmit and receive functions are enabled. To change the operating mode, the EtherC and E-DMAC modules are got into at their initial state by means of the software reset bit (SWR) in this register, then make new settings. It takes 64 cycles of the internal bus clock B to initialize the EtherC and E-DMAC. Therefore, registers of the EtherC and E-DMAC should be accessed after 64 cycles of the internal bus clock B has elapsed.
Bit 31 to 7 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 6 DE 0 R/W E-DMAC Data Endian Convert Selects whether or not the endian format is converted on data transfer by the E-DMAC. However, the endian format of the descriptors and E-DMAC register values are not converted regardless of this bit setting. 0: Endian format not converted (big endian) 1: Endian format converted (little endian) 5 4 DL1 DL0 0 0 R/W R/W Descriptor Length These bits specify the descriptor length. 00: 16 bytes 01: 32 bytes 10: 64 bytes 11: Reserved (setting prohibited) 3 to 1 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 269 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 0
Bit Name SWR
Initial value 0
R/W R/W
Description Software Reset Writing 1 in this bit initializes registers of the E-DMAC other than TDLAR, RDLAR, and RMFCR and registers of the EtherC. While a software reset is being executed (64 cycles of the internal bus clock B), accesses to the all Ethernet-related registers are prohibited. Software reset period (example): When B = 62.5 MHz: 1.03 S When B = 33 MHz: 1.94 S This bit is always read as 0. 0: Writing 0 is ignored (E-DMAC operation is not affected) 1: Writing 1 resets the EtherC and E-DMAC and then automatically cleared
12.2.2
E-DMAC Transmit Request Register (EDTRR)
The EDTRR is a 32-bit readable/writable register that issues transmit directives to the E-DMAC. When transmission of one frame is completed, the next descriptor is read. If the transmit descriptor active bit in this descriptor has the "active" setting, transmission is continued. If the transmit descriptor active bit has the "inactive" setting, the TR bit is cleared and operation of the transmit DMAC is halted.
Bit 31 to 1 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 TR 0 R/W Transmit Request 0: Transmission-halted state. Writing 0 does not stop transmission. Termination of transmission is controlled by the active bit in the transmit descriptor 1: Start of transmission. The relevant descriptor is read and a frame is sent with the transmit active bit set to 1
Rev. 6.00 Jul. 15, 2009 Page 270 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.3
E-DMAC Receive Request Register (EDRRR)
EDRRR is a 32-bit readable/writable register that issues receive directives to the E-DMAC. When the receive request bit is set, the E-DMAC reads the relevant receive descriptor. If the receive descriptor active bit in the descriptor has the "active" setting, the E-DMAC prepares for a receive request from the EtherC. When one receive buffer of data has been received, the E-DMAC reads the next descriptor and prepares to receive the next frame. If the receive descriptor active bit in the descriptor has the "inactive" setting, the RR bit is cleared and operation of the receive DMAC is halted.
Bit 31 to 1 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 RR 0 R/W Receive Request 0: The receive function is disabled* 1: A receive descriptor is read and the E-DMAC is ready to receive Note: * If the receive function is disabled during frame reception, write-back is not performed successfully to the receive descriptor. Following pointers to read a receive descriptor become abnormal and the E-DMAC cannot operate successfully. In this case, to make the E-DMAC reception enabled again, execute a software reset by the SWR bit in EDMR. To make the E-DMAC reception disabled without executing a software reset, set the RE bit in ECMR. Next, after the E_DMAC has completed the reception and write-back to the receive descriptor has been confirmed, disable the receive function of this register.
Rev. 6.00 Jul. 15, 2009 Page 271 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.4
Transmit Descriptor List Address Register (TDLAR)
TDLAR is a 32-bit readable/writable register that specifies the start address of the transmit descriptor list. Descriptors have a boundary configuration in accordance with the descriptor length indicated by the DL bit in EDMR. This register must not be written to during transmission. Modifications to this register should only be made while transmission is disabled by the TR bit (= 0) in the E-DMAC transmit request register (EDTRR).
Bit 31 to 0 Bit Name TDLA31 to TDLA0 Initial value All 0 R/W R/W Description Transmit Descriptor Start Address The lower bits are set as follows according to the specified descriptor length. 16-byte boundary: TDLA3 to TDLA0 = 0000 32-byte boundary: TDLA4 to TDLA0 = 00000 64-byte boundary: TDLA5 to TDLA0 = 000000
12.2.5
Receive Descriptor List Address Register (RDLAR)
RDLAR is a 32-bit readable/writable register that specifies the start address of the receive descriptor list. Descriptors have a boundary configuration in accordance with the descriptor length indicated by the DL bit in EDMR. This register must not be written to during reception. Modifications to this register should only be made while reception is disabled by the RR bit (= 0) in the E-DMAC Receive Request Register (EDRRR).
Bit 31 to 0 Bit Name RDLA31 to RDLA0 Initial value All 0 R/W R/W Description Receive Descriptor Start Address The lower bits are set as follows according to the specified descriptor length. 16-byte boundary: RDLA3 to RDLA0 = 0000 32-byte boundary: RDLA4 to RDLA0 = 00000 64-byte boundary: RDLA5 to RDLA0 = 000000
Rev. 6.00 Jul. 15, 2009 Page 272 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.6
EtherC/E-DMAC Status Register (EESR)
EESR is a 32-bit readable/writable register that shows communications status information on the E-DMAC in combination with the EtherC. The information in this register is reported in the form of interrupts. Individual bits are cleared by writing 1 (however, bit 22 (ECI) is a read-only bit and not to be cleared by writing 1) and are not affected by writing 0. Each interrupt source can also be masked by means of the corresponding bit in the EtherC/E-DMAC status interrupt permission register (EESIPR). The interrupts generated by this register are EINT0. For interrupt priority, see section 6.5, Interrupt Exception Handling Vector Table.
Bit 31 Bit Name Initial value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 30 TWB 0 R/W Write-Back Complete Indicates that write-back from the E-DMAC to the corresponding descriptor has completed. This operation is enabled when the TIS bit in TRIMD is set to 1. 0: Write-back has not completed, or no transmission directive 1: Write-back has completed 29 to 27 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 26 TABT 0 R/W Transmit Abort Detection Indicates that frame transmission by the EtherC has been aborted because of an error during transmission. 0: Frame transmission has not been aborted or no transmit directive 1: Frame transmit has been aborted
Rev. 6.00 Jul. 15, 2009 Page 273 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 25
Bit Name RABT
Initial value 0
R/W R/W
Description Receive Abort Detection Indicates that frame reception by the EtherC has been aborted because of an error during reception. 0: Frame reception has not been aborted or no receive directive 1: Frame receive has been aborted
24
RFCOF
0
R/W
Receive Frame Counter Overflow Indicates that the receive FIFO frame counter has overflowed. 0: Receive frame counter has not overflowed 1: Receive frame counter overflows
23
ADE
0
R/W
Address Error Indicates that the memory address that the E-DMAC tried to transfer is found illegal. 0: Illegal memory address not detected (normal operation) 1: Illegal memory address detected Note: When an address error is detected, the E-DMAC halts transmitting/receiving. To resume the operation, set the E-DMAC again after software reset by means of the SWR bit in EDMR.
22
ECI
0
R
EtherC Status Register Interrupt Source This bit is a read-only bit. When the source of an ECSR interrupt in the EtherC is cleared, this bit is also cleared. 0: EtherC status interrupt source has not been detected 1: EtherC status interrupt source has been detected
Rev. 6.00 Jul. 15, 2009 Page 274 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 21
Bit Name TC
Initial value 0
R/W R/W
Description Frame Transmit Complete Indicates that all the data specified by the transmit descriptor has been transmitted to the EtherC. The transfer status is written back to the relevant descriptor. For 1-frame/1-buffer processing, when 1frame transmission is completed and the transmission descriptor valid bit (TACT) in the next descriptor is not set, transmission is completed and this bit is set to 1. Likewise, for multiple-frame buffer processing, when the last data in the frame is transmitted and the transmission descriptor valid bit (TACT) in the next descriptor is not set, transmission is completed and this bit is set to 1. After frame transmission, the EDMAC writes the transmission status back to the descriptor. 0: Transfer not complete, or no transfer directive 1: Transfer complete
20
TDE
0
R/W
Transmit Descriptor Empty Indicates that the transmission descriptor valid bit (TACT) in the descriptor is not set when the E-DMAC reads the transmission descriptor when the previous descriptor is not the last one of the frame for multiplebuffer frame processing. As a result, an incomplete frame may be transmitted. 0: Transmit descriptor active bit TACT = 1 detected 1: Transmit descriptor active bit TACT = 0 detected When transmission descriptor empty (TDE = 1) occurs, execute a software reset and initiate transmission. In this case, the address that is stored in the transmit descriptor list address register (TDLAR) is transmitted first.
19
TFUF
0
R/W
Transmit FIFO Underflow Indicates that underflow has occurred in the transmit FIFO during frame transmission. Incomplete data is sent onto the line. 0: Underflow has not occurred 1: Underflow has occurred
Rev. 6.00 Jul. 15, 2009 Page 275 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 18
Bit Name FR
Initial value 0
R/W R/W
Description Frame Reception Indicates that a frame has been received and the receive descriptor has been updated. This bit is set to 1 each time a frame is received. 0: Frame not received 1: Frame received
17
RDE
0
R/W
Receive Descriptor Empty When receive descriptor empty (RDE = 1) occurs, receiving can be restarted by setting RACT = 1 in the receive descriptor and initiating receiving. 0: Receive descriptor active bit RACT = 1 not detected 1: Receive descriptor active bit RACT = 0 detected
16
RFOF
0
R/W
Receive FIFO Overflow Indicates that the receive FIFO has overflowed during frame reception. 0: Overflow has not occurred 1: Overflow has occurred
15 to 12
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
11
CND
0
R/W
Carrier Not Detect Indicates the carrier detection status. 0: A carrier is detected when transmission starts 1: A carrier is not detected when transmission starts
10
DLC
0
R/W
Detect Loss of Carrier Indicates that loss of the carrier has been detected during frame transmission. 0: Loss of carrier not detected 1: Loss of carrier detected
9
CD
0
R/W
Delayed Collision Detect Indicates that a delayed collision has been detected during frame transmission. 0: Delayed collision not detected 1: Delayed collision detected
Rev. 6.00 Jul. 15, 2009 Page 276 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 8
Bit Name TRO
Initial value 0
R/W R/W
Description Transmit Retry Over Indicates that a retry-over condition has occurred during frame transmission. Total 16 transmission retries including 15 retries based on the back-off algorithm are failed after the EtherC transmission starts. 0: Transmit retry-over condition not detected 1: Transmit retry-over condition detected
7
RMAF
0
R/W
Receive Multicast Address Frame 0: Multicast address frame has not been received 1: Multicast address frame has been received
6, 5
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
4
RRF
0
R/W
Receive Residual-Bit Frame 0: Residual-bit frame has not been received 1: Residual-bit frame has been received
3
RTLF
0
R/W
Receive Too-Long Frame Indicates that the frame more than the number of receive frame length upper limit set by RFLR of the EtherC has been received. 0: Too-long frame has not been received 1: Too-long frame has been received
2
RTSF
0
R/W
Receive Too-Short Frame Indicates that a frame of fewer than 64 bytes has been received. 0: Too-short frame has not been received 1: Too-short frame has been received
1
PRE
0
R/W
PHY Receive Error 0: PHY receive error not detected 1: PHY receive error detected
0
CERF
0
R/W
CRC Error on Received Frame 0: CRC error not detected 1: CRC error detected
Rev. 6.00 Jul. 15, 2009 Page 277 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.7
EtherC/E-DMAC Status Interrupt Permission Register (EESIPR)
EESIPR is a 32-bit readable/writable register that enables interrupts corresponding to individual bits in the EtherC/E-DMAC status register (EESR). An interrupt is enabled by writing 1 to the corresponding bit. In the initial state, interrupts are not enabled.
Bit 31 Bit Name Initial value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 30 TWBIP 0 R/W Write-Back Complete Interrupt Permission 0: Write-back complete interrupt is disabled 1: Write-back complete interrupt is enabled 29 to 27 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 26 TABTIP 0 R/W Transmit Abort Detection Interrupt Permission 0: Transmit abort detection interrupt is disabled 1: Transmit abort detection interrupt is enabled 25 RABTIP 0 R/W Receive Abort Detection Interrupt Permission 0: Receive abort detection interrupt is disabled 1: Receive abort detection interrupt is enabled 24 RFCOFIP 0 R/W Receive Frame Counter Overflow Interrupt Permission 0: Receive frame counter overflow interrupt is disabled 1: Receive frame counter overflow interrupt is enabled 23 ADEIP 0 R/W Address Error Interrupt Permission 0: Address error interrupt is disabled 1: Address error interrupt is enabled 22 ECIIP 0 R/W EtherC Status Register Interrupt Permission 0: EtherC status interrupt is disabled 1: EtherC status interrupt is enabled 21 TCIP 0 R/W Frame Transmit Complete Interrupt Permission 0: Frame transmit complete interrupt is disabled 1: Frame transmit complete interrupt is enabled
Rev. 6.00 Jul. 15, 2009 Page 278 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 20
Bit Name TDEIP
Initial value 0
R/W R/W
Description Transmit Descriptor Empty Interrupt Permission 0: Transmit descriptor empty interrupt is disabled 1: Transmit descriptor empty interrupt is enabled
19
TFUFIP
0
R/W
Transmit FIFO Underflow Interrupt Permission 0: Underflow interrupt is disabled 1: Underflow interrupt is enabled
18
FRIP
0
R/W
Frame Received Interrupt Permission 0: Frame received interrupt is disabled 1: Frame received interrupt is enabled
17
RDEIP
0
R/W
Receive Descriptor Empty Interrupt Permission 0: Receive descriptor empty interrupt is disabled 1: Receive descriptor empty interrupt is enabled
16
RFOFIP
0
R/W
Receive FIFO Overflow Interrupt Permission 0: Receive FIFO overflow interrupt is disabled 1: Receive FIFO overflow interrupt is enabled
15 to 12
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
11
CNDIP
0
R/W
Carrier Not Detect Interrupt Permission 0: Carrier not detect interrupt is disabled 1: Carrier not detect interrupt is enabled
10
DLCIP
0
R/W
Detect Loss of Carrier Interrupt Permission 0: Detect loss of carrier interrupt is disabled 1: Detect loss of carrier interrupt is enabled
9
CDIP
0
R/W
Delayed Collision Detect Interrupt Permission 0: Delayed collision detect interrupt is disabled 1: Delayed collision detect interrupt is enabled
8
TROIP
0
R/W
Transmit Retry Over Interrupt Permission 0: Transmit retry over interrupt is disabled 1: Transmit retry over interrupt is enabled
Rev. 6.00 Jul. 15, 2009 Page 279 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 7
Bit Name RMAFIP
Initial value 0
R/W R/W
Description Receive Multicast Address Frame Interrupt Permission 0: Receive multicast address frame interrupt is disabled 1: Receive multicast address frame interrupt is enabled
6, 5
All 0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
RRFIP
0
R/W
Receive Residual-Bit Frame Interrupt Permission 0: Receive residual-bit frame interrupt is disabled 1: Receive residual-bit frame interrupt is enabled
3
RTLFIP
0
R/W
Receive Too-Long Frame Interrupt Permission 0: Receive too-long frame interrupt is disabled 1: Receive too-long frame interrupt is enabled
2
RTSFIP
0
R/W
Receive Too-Short Frame Interrupt Permission 0: Receive too-short frame interrupt is disabled 1: Receive too-short frame interrupt is enabled
1
PREIP
0
R/W
PHY-LSI Receive Error Interrupt Permission 0: PHY-LSI receive error interrupt is disabled 1: PHY-LSI receive error interrupt is enabled
0
CERFIP
0
R/W
CRC Error on Received Frame 0: CRC error on received frame interrupt is disabled 1: CRC error on received frame interrupt is enabled
Rev. 6.00 Jul. 15, 2009 Page 280 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.8
Transmit/Receive Status Copy Enable Register (TRSCER)
TRSCER specifies whether or not transmit and receive status information reported by bits in the EtherC/E-DMAC status register is to be indicated in bits TFS26 to TFS0 and RFS26 to RFS0 in the corresponding descriptor. Bits in this register correspond to bits 11 to 0 in the EtherC/EDMAC status register (EESR). When a bit is cleared to 0, the transmit status (bits 11 to 8 in EESR) is indicated in bits TFS3 to TFS0 in the transmit descriptor, and the receive status (bits 7 to 0 in EESR) is indicated in bits RFS7 to RFS0 of the receive descriptor. When a bit is set to 1, the occurrence of the corresponding interrupt is not indicated in the descriptor. After this LSI is reset, all bits are cleared to 0.
Bit 31 to 12 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 11 CNDCE 0 R/W CND Bit Copy Directive 0: Indicates the CND bit state in bit TFS3 in the transmit descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit TFS3 of the transmit descriptor 10 DLCCE 0 R/W DLC Bit Copy Directive 0: Indicates the DLC bit state in bit TFS2 of the transmit descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit TFS2 of the transmit descriptor 9 CDCE 0 R/W CD Bit Copy Directive 0: Indicates the CD bit state in bit TFS1 of the transmit descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit TFS1 of the transmit descriptor 8 TROCE 0 R/W TRO Bit Copy Directive 0: Indicates the TRO bit state in bit TFS0 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit TFS0 of the receive descriptor
Rev. 6.00 Jul. 15, 2009 Page 281 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 7
Bit Name RMAFCE
Initial value 0
R/W R/W
Description RMAF Bit Copy Directive 0: Indicates the RMAF bit state in bit RFS7 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS7 of the receive descriptor
6, 5
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
4
RRFCE
0
R/W
RRF Bit Copy Directive 0: Indicates the RRF bit state in bit RFS4 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS4 of the receive descriptor
3
RTLFCE
0
R/W
RTLF Bit Copy Directive 0: Indicates the RTLF bit state in bit RFS3 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS3 of the receive descriptor
2
RTSFCE
0
R/W
RTSF Bit Copy Directive 0: Indicates the RTSF bit state in bit RFS2 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS2 of the receive descriptor
1
PRECE
0
R/W
PRE Bit Copy Directive 0: Indicates the PRF bit state in bit RFS1 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS1 of the receive descriptor
0
CERFCE
0
R/W
CERF Bit Copy Directive 0: Indicates the CERF bit state in bit RFS0 of the receive descriptor 1: Occurrence of the corresponding interrupt is not indicated in bit RFS0 of the receive descriptor
Rev. 6.00 Jul. 15, 2009 Page 282 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.9
Receive Missed-Frame Counter Register (RMFCR)
RMFCR is a 16-bit counter that indicates the number of frames missed (discarded, and not transferred to the receive buffer) during reception. When the receive FIFO overflows, the receive frames in the FIFO are discarded. The number of frames discarded at this time is counted. When the value in this register reaches H'FFFF, counting-up is halted. When this register is read, the counter value is cleared to 0. Write operations to this register have no effect.
Bit 31 to 16 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 MFC15 to MFC0 All 0 R Missed-Frame Counter Indicate the number of frames that are discarded and not transferred to the receive buffer during reception.
Rev. 6.00 Jul. 15, 2009 Page 283 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.10 Transmit FIFO Threshold Register (TFTR) TFTR is a 32-bit readable/writable register that specifies the transmit FIFO threshold at which the first transmission is started. The actual threshold is 4 times the set value. The EtherC starts transmission when the amount of data in the transmit FIFO exceeds the number of bytes specified by this register, when the transmit FIFO is full, or when 1-frame write is executed. When setting this register, do so in the transmission-halt state.
Bit 31 to 11 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 10 to 0 TFT10 to TFT0 All 0 R/W Transmit FIFO threshold When setting a transmit FIFO, the FIFO must be set to a smaller value than the specified value of the FIFO capacity by FDR. H'00: Store and forward modes H'01 to H'0C: Setting prohibited H'0D: 52 bytes H'0E: 56 bytes : : H'1F: 124 bytes H'20: 128 bytes : : H'3F: 252 bytes H'40: 256 bytes : : H'7F: 508 bytes H'80: 512 bytes H'81 to H'200: Setting prohibited Note: When starting transmission before one frame of data write has completed, take care the generation of the underflow.
Rev. 6.00 Jul. 15, 2009 Page 284 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.11 FIFO Depth Register (FDR) FDR is a 32-bit readable/writable register that specifies the depth of the transmit and receive FIFOs.
Bit 31 to 11 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 10 to 8 TFD2 to TFD0 B'001 R/W Transmit FIFO Depth These bits specify the depth of the transmit FIFO. After the start of the transmission and reception, the setting cannot be changed. 000: 256 bytes 001: 512 bytes Other than above: Setting prohibited 7 to 3 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 2 to 0 RFD2 to RFD0 B'001 R/W Receive FIFO Depth These bits specify the depth of the receive FIFO. After the start of the transmission and reception, the setting cannot be changed. 000: 256 bytes 001: 512 bytes Other than above: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 285 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.12 Receiving Method Control Register (RMCR) RMCR is a 32-bit readable/writable register that specifies the control method for the RR bit in EDRRR when a frame is received. This register must be set during the receiving-halt state.
Bit 31 to 1 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 RNC 0 R/W Receive Enable Control 0: When reception of one frame is completed, the EDMAC writes the receive status into the descriptor and clears the RR bit in EDRRR 1: When reception of one frame is completed, the EDMAC writes the receive status into the descriptor, reads the next descriptor, and prepares to receive the next frame
Rev. 6.00 Jul. 15, 2009 Page 286 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.13 E-DMAC Operation Control Register (EDOCR) EDOCR is a 32-bit readable/writable register that specifies the control methods used in E-DMAC operation.
Bit 31 to 4 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 3 FEC 0 R/W FIFO Error Control Specifies E-DMAC operation when transmit FIFO underflow or receive FIFO overflow occurs. 0: E-DMAC operation continues when underflow or overflow occurs 1: E-DMAC operation halts when underflow or overflow occurs 2 AEC 0 R/W Address Error Control Indicates detection of an illegal memory address in an attempted E-DMAC transfer. 0: Illegal memory address not detected (normal operation) 1: E-DMAC stops its operation due to illegal memory address detection Note: To resume the operation, set the E-DMAC again after software reset by means of the SWR bit in EDMR. 1 EDH 0 R/W E-DMAC Halted 0: The E-DMAC is operating normally 1: The E-DMAC has been halted by NMI pin assertion. E-DMAC operation is restarted by writing 0 0 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 287 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.14 Receiving-Buffer Write Address Register (RBWAR) RBWAR stores the address of data to be written in the receiving buffer when the E-DMAC writes data to the receiving buffer. Which addresses in the receiving buffer are processed by the EDMAC can be recognized by monitoring addresses displayed in this register. The address that the E-DMAC is actually processing may be different from the value read from this register.
Bit 31 to 0 Bit Name RBWA31 to RBWA0 Initial value All 0 R/W R Description Receiving-Buffer Write Address These bits can only be read. Writing is prohibited.
12.2.15 Receiving-Descriptor Fetch Address Register (RDFAR) RDFAR stores the descriptor start address that is required when the E-DMAC fetches descriptor information from the receiving descriptor. Which receiving descriptor information is used for processing by the E-DMAC can be recognized by monitoring addresses displayed in this register. The address from which the E-DMAC is actually fetching a descriptor may be different from the value read from this register.
Bit 31 to 0 Bit Name RDFA31 to RDFA0 Initial value All 0 R/W R Description Receiving-Descriptor Fetch Address These bits can only be read. Writing is prohibited.
12.2.16 Transmission-Buffer Read Address Register (TBRAR) TBRAR stores the address of the transmission buffer when the E-DMAC reads data from the transmission buffer. Which addresses in the transmission buffer are processed by the E-DMAC can be recognized by monitoring addresses displayed in this register. The address from which the E-DMAC is actually reading in the buffer may be different from the value read from this register.
Bit 31 to 0 Bit Name TBRA31 to TBRA0 Initial value All 0 R/W R Description Transmission-Buffer Read Address These bits can only be read. Writing is prohibited.
Rev. 6.00 Jul. 15, 2009 Page 288 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.2.17 Transmission-Descriptor Fetch Address Register (TDFAR) TDFAR stores the descriptor start address that is required when the E-DMAC fetches descriptor information from the transmission descriptor. Which transmission descriptor information is used for processing by the E-DMAC can be recognized by monitoring addresses displayed in this register. The address from which the E-DMAC is actually fetching a descriptor may be different from the value read from this register.
Bit 31 to 0 Bit Name TDFA31 to TDFA0 Initial value All 0 R/W R Description Transmission-Descriptor Fetch Address These bits can only be read. Writing is prohibited.
12.2.18 Flow Control FIFO Threshold Register (FCFTR) FCFTR is a 32-bit readable/writable register that sets the flow control of the EtherC (setting the threshold on automatic PAUSE transmission). The threshold can be specified by the depth of the receive FIFO data (RFD2 to RFD0) and the number of receive frames (RFF2 to RFF0). The condition to start the flow control is decided by taking OR operation on the two thresholds. Therefore, the flow control by the two thresholds is independently started. When flow control is performed according to the RFD bits setting, if the setting is the same as the depth of the receive FIFO specified by the FIFO depth register (FDR), flow control is started when the remaining FIFO is (FIFO data - 64) bytes. For instance, when RFD in FDR = 1 and RFD in FCFTR = 1, flow control is started when (512 - 64) bytes of data is stored in the receive FIFO. The value set in the RFD bits in this register should be equal to or less than those in FDR.
Bit 31 to 19 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 289 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 18 17 16
Bit Name RFF2 RFF1 RFF0
Initial value 1 1 1
R/W R/W R/W R/W
Description Receive Frame Number Flow Control Threshold 000: When one receive frame has been stored in the receive FIFO 001: When two receive frames have been stored in the receive FIFO : : 110: When seven receive frames have been stored in the receive FIFO 111: When eight receive frames have been stored in the receive FIFO
15 to 3
All 0
Reserved These bits are always read as 0. The write value should always be 0.
2 1 0
RFD2 RFD1 RFD0
0 0 0
R/W R/W R/W
Receive Byte Flow Control Threshold 000: When (256 - 64) bytes of data is stored in the receive FIFO 001: When (512 - 64) bytes of data is stored in the receive FIFO Other than above: Setting prohibited
12.2.19 Transmit Interrupt Register (TRIMD) TRIMD is a 32-bit readable/writable register that specifies whether or not to notify write-back completion for each frame using the TWB bit in EESR and an interrupt on transmit operations.
Bit 31 to 1 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 TIS 0 R/W Transmit Interrupt Setting 0: Write-back completion for each frame is not notified 1: Write-backed completion for each frame using the TWB bit in EESR is notified
Rev. 6.00 Jul. 15, 2009 Page 290 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.3
Operation
The E-DMAC is connected to the EtherC, and performs efficient transfer of transmit/receive data between the EtherC and memory (buffers) without the intervention of the CPU. The E-DMAC itself reads control information, including buffer pointers called descriptors, relating to the buffers. The E-DMAC reads transmit data from the transmit buffer and writes receive data to the receive buffer in accordance with this control information. By setting up a number of consecutive descriptors (a descriptor list), it is possible to execute transmission and reception continuously. 12.3.1 Descriptor List and Data Buffers
Before starting transmission/reception, the communication program creates transmit and receive descriptor lists in memory. The start addresses of these lists are then set in the transmit and receive descriptor list start address registers. The descriptor start address must be aligned so that it matches the address boundary according to the descriptor length set by the E-DMAC mode register (EDMR). The transmit buffer start address can be aligned with a byte, a word, and a longword boundary. (1) Transmit Descriptor
Figure 12.2 shows the relationship between a transmit descriptor and the transmit buffer. According to the specification in this descriptor, the relationship between the transmit frame and transmit buffer can be defined as one frame/one buffer or one frame/multi-buffer.
Rev. 6.00 Jul. 15, 2009 Page 291 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Transmit descriptor 31 30 29 28 27 26 TTTTT ADFFF CLPPE TE10 31 TD1 31 TD2 TBA Padding (4 bytes) TDL 0 0 TFS26 to TFS0
Transmit buffer
TD0
16
Valid transmit data
Figure 12.2 Relationship between Transmit Descriptor and Transmit Buffer
Rev. 6.00 Jul. 15, 2009 Page 292 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(a)
Transmit Descriptor 0 (TD0)
TD0 indicates the transmit frame status. The CPU and E-DMAC use TD0 to report the frame transmission status.
Bit 31 Bit Name TACT Initial value 0 R/W R/W Description Transmit Descriptor Active Indicates that this descriptor is active. The CPU sets this bit after transmit data has been transferred to the transmit buffer. The E-DMAC resets this bit on completion of a frame transfer or when transmission is suspended. 0: The transmit descriptor is invalid. Indicates that valid data has not been written to this bit by the CPU, or this bit has been reset by a writeback operation on termination of E-DMAC frame transfer processing (completion or suspension of transmission) If this state is recognized in an E-DMAC descriptor read, the E-DMAC terminates transmit processing and transmit operations cannot be continued (a restart is necessary) 1: The transmit descriptor is valid. Indicates that valid data has been written to the transmit buffer by the CPU and frame transfer processing has not yet been executed, or that frame transfer is in progress When this state is recognized in an E-DMAC descriptor read, the E-DMAC continues with the transmit operation 30 TDLE 0 R/W Transmit Descriptor List End After completion of the corresponding buffer transfer, the E-DMAC references the first descriptor. This specification is used to set a ring configuration for the transmit descriptors. 0: This is not the last transmit descriptor list 1: This is the last transmit descriptor list
Rev. 6.00 Jul. 15, 2009 Page 293 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 29 28
Bit Name TFP1 TFP0
Initial value 0 0
R/W R/W R/W
Description Transmit Frame Position 1, 0 These two bits specify the relationship between the transmit buffer and transmit frame. In the preceding and following descriptors, a logically positive relationship must be maintained between the settings of this bit and the TDLE bit. 00: Frame transmission for transmit buffer indicated by this descriptor continues (frame is not concluded) 01: Transmit buffer indicated by this descriptor contains end of frame (frame is concluded) 10: Transmit buffer indicated by this descriptor is start of frame (frame is not concluded) 11: Contents of transmit buffer indicated by this descriptor are equivalent to one frame (one frame/one buffer)
27
TFE
0
R/W
Transmit Frame Error Indicates that one or other bit of the transmit frame status indicated by bits 26 to 0 is set. Whether or not the transmit frame status information is copied into this bit is specified by the transmit/receive status copy enable register. 0: No error during transmission 1: An error occurred during transmission
26 to 0
TFS26 to TFS0
All 0
R/W
Transmit Frame Status TFS26 to TFS4: Reserved (The write value should always be 0.) TFS3: Carrier Not Detect (corresponds to CND bit in EESR) TFS2: Detect Loss of Carrier (corresponds to DLC bit in EESR) TFS1: Delayed Collision Detect (corresponds to CD bit in EESR) TFS0: Transmit Retry Over (corresponds to TRO bit in EESR)
Rev. 6.00 Jul. 15, 2009 Page 294 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(b)
Transmit Descriptor 1 (TD1)
TD1 specifies the transmit buffer length (maximum 64 kbytes).
Bit 31 to 16 Bit Name TDL Initial value All 0 R/W R/W Description Transmit Buffer Data Length These bits specify the valid transfer byte length in the corresponding transmit buffer. When the one frame/multi-buffer system is specified (TD0 and TFP = 10 or 00), the transfer byte length specified in the descriptors at the start and midway can be set in byte units. 15 to 0 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
(c)
Transmit Descriptor 2 (TD2)
TD2 specifies the 32-bit transmit buffer start address. The transmit buffer start address setting can be aligned with a byte, a word, or a longword boundary.
Rev. 6.00 Jul. 15, 2009 Page 295 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(2)
Receive Descriptor
Figure 12.3 shows the relationship between a receive descriptor and the receive buffer. In frame reception, the E-DMAC performs data rewriting up to a receive buffer 16-byte boundary, regardless of the receive frame length. Finally, the actual receive frame length is reported in the lower 16 bits of RD1 in the descriptor. Data transfer to the receive buffer is performed automatically by the E-DMAC to give a one frame/one buffer or one frame/multi-buffer configuration according to the size of one received frame.
Receive descriptor 31 30 29 28 27 26 RRRRR ADF FF CLPPE TE1 0 RBL 31 31 16 RBA Padding (4 bytes) 0 RFS26 to RFS0 Valid receive data Receive buffer
RD0
15 RDL
0 0
RD1 RD2
Figure 12.3 Relationship between Receive Descriptor and Receive Buffer
Rev. 6.00 Jul. 15, 2009 Page 296 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(a)
Receive Descriptor 0 (RD0)
RD0 indicates the receive frame status. The CPU and E-DMAC use RD0 to report the frame receive status.
Bit 31 Bit Name RACT Initial value 0 R/W R/W Description Receive Descriptor Active Indicates that this descriptor is active. The E-DMAC resets this bit after receive data has been transferred to the receive buffer. On completion of receive frame processing, the CPU sets this bit to prepare for reception. 0: The receive descriptor is invalid. Indicates that the receive buffer is not ready (access disabled by E-DMAC), or this bit has been reset by a write-back operation on termination of EDMAC frame transfer processing (completion or suspension of reception). If this state is recognized in an E-DMAC descriptor read, the E-DMAC terminates receive processing and receive operations cannot be continued. Reception can be restarted by setting RACT to 1 and executing receive initiation. 1: The receive descriptor is valid Indicates that the receive buffer is ready (access enabled) and processing for frame transfer from the FIFO has not been executed, or that frame transfer is in progress. When this state is recognized in an E-DMAC descriptor read, the E-DMAC continues with the receive operation. 30 RDLE 0 R/W Receive Descriptor List Last After completion of the corresponding buffer transfer, the E-DMAC references the first receive descriptor. This specification is used to set a ring configuration for the receive descriptors. 0: This is not the last receive descriptor list 1: This is the last receive descriptor list
Rev. 6.00 Jul. 15, 2009 Page 297 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 29 28
Bit Name RFP1 RFP0
Initial value 0 0
R/W R/W R/W
Description Receive Frame Position These two bits specify the relationship between the receive buffer and receive frame. 00: Frame reception for receive buffer indicated by this descriptor continues (frame is not concluded) 01: Receive buffer indicated by this descriptor contains end of frame (frame is concluded) 10: Receive buffer indicated by this descriptor is start of frame (frame is not concluded) 11: Contents of receive buffer indicated by this descriptor are equivalent to one frame (one frame/one buffer)
27
RFE
0
R/W
Receive Frame Error Indicates that one or other bit of the receive frame status indicated by bits 26 to 0 is set. Whether or not the receive frame status information is copied into this bit is specified by the transmit/receive status copy enable register. 0: No error during reception 1: A certain kind of error occurred during reception
Rev. 6.00 Jul. 15, 2009 Page 298 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 26 to 0
Bit Name RFS26 to RFS0
Initial value All 0
R/W R/W
Description Receive Frame Status These bits indicate the error status during frame reception. RFS26 to RFS10: Reserved (The write value should always be 0.) RFS9: Receive FIFO overflow (corresponds to RFOF bit in EESR) RFS8: Reserved (The write value should always be 0.) RFS7: Multicast address frame received (corresponds to RMAF bit in EESR) RFS6: CAM entry unregistered frame received (corresponds to the RUAF bit in EESR) RSF5: Reserved (The write value should always be 0.) RFS4: Receive residual-bit frame error (corresponds to RRF bit in EESR) RFS3: Receive too-long frame error (corresponds to RTLF bit in EESR) RFS2: Receive too-short frame error (corresponds to RTSF bit in EESR) RFS1: PHY-LSI receive error (corresponds to PRE bit in EESR) RFS0: CRC error on received frame (corresponds to CERF bit in EESR)
Rev. 6.00 Jul. 15, 2009 Page 299 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(b)
Receive Descriptor 1 (RD1)
RD1 specifies the receive buffer length (maximum 64 kbytes).
Bit 31 to 16 Bit Name RBL Initial value All 0 R/W R/W Description Receive Buffer Length These bits specify the maximum reception byte length in the corresponding receive buffer. The transfer byte length must align with a 16-byte boundary (bits 19 to 16 cleared to 0). The maximum receive frame length with one frame per buffer is 1,514 bytes, excluding the CRC data. Therefore, for the receive buffer length specification, a value of 1,520 bytes (H'05F0) that takes account of a 16-byte boundary is set as the maximum receive frame length. 15 to 0 RDL All 0 R/W Receive Data Length These bits specify the data length of a receive frame stored in the receive buffer. The receive data transferred to the receive buffer does not include the 4-byte CRC data at the end of the frame. The receive frame length is reported as the number of words (valid data bytes) not including this CRC data.
(c)
Receive Descriptor 2 (RD2)
RD2 specifies the 32-bit receive buffer start address. The receive buffer start address must be aligned with a longword boundary. However, when SDRAM is connected, it must be aligned with a 16-byte boundary. 12.3.2 Transmission
When the transmit function is enabled and the transmit request bit (TR) is set in the E-DMAC transmit request register (EDTRR), the E-DMAC reads the descriptor used last time from the transmit descriptor list (in the initial state, the descriptor indicated by the transmission descriptor start address register (TDLAR)). If the setting of the TACT bit in the read descriptor is active, the E-DMAC reads transmit frame data sequentially from the transmit buffer start address specified by TD2, and transfers it to the EtherC. The EtherC creates a transmit frame and starts transmission to the MII. After DMA transfer of data equivalent to the buffer length specified in the descriptor, the following processing is carried out according to the TFP value.
Rev. 6.00 Jul. 15, 2009 Page 300 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
1. TFP = 00 or 01 (frame continuation): Descriptor write-back is performed after DMA transfer. 2. TFP = 01 or 11 (frame end): Descriptor write-back is performed after completion of frame transmission. The E-DMAC continues reading descriptors and transmitting frames as long as the setting of the TACT bit in the read descriptors is "active." When a descriptor with an "inactive" TACT bit is read, the E-DMAC resets the transmit request bit (TR) in the transmit register and ends transmit processing (EDTRR).
Transmission flowchart This LSI + memory E-DMAC Transmit FIFO EtherC PHY
EtherC/E-DMAC initialization
Descriptor and transmit buffer setting Transmit directive Descriptor read
Transmit data transfer Descriptor write-back Descriptor read
Transmit data transfer Frame transmission
Descriptor write-back Transmission completed
Figure 12.4 Sample Transmission Flowchart
Rev. 6.00 Jul. 15, 2009 Page 301 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.3.3
Reception
When the receive function is enabled and the CPU sets the receive request bit (RR) in the EDMAC receive request register (EDRRR), the E-DMAC reads the descriptor following the previously used one from the receive descriptor list (in the initial state, the descriptor indicated by the transmission descriptor start address register (TDLAR)), and then enters the receive-standby state. If the setting of the RACT bit is "active" and an own-address frame is received, the EDMAC transfers the frame to the receive buffer specified by RD2. If the data length of the received frame is greater than the buffer length given by RD1, the E-DMAC performs write-back to the descriptor when the buffer is full (RFP = 10 or 00), then reads the next descriptor. The EDMAC then continues to transfer data to the receive buffer specified by the new RD2. When frame reception is completed, or if frame reception is suspended because of a certain kind of error, the E-DMAC performs write-back to the relevant descriptor (RFP = 11 or 01), and then ends the receive processing. The E-DMAC then reads the next descriptor and enters the receive-standby state again. To receive frames continuously, the receive enable control bit (RNC) must be set to 1 in the receive control register (RCR). After initialization, this bit is cleared to 0.
Rev. 6.00 Jul. 15, 2009 Page 302 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Reception flowchart This LSI + memory E-DMAC Receive FIFO EtherC PHY
EtherC/E-DMAC initialization
Descriptor and receive buffer setting Start of reception Descriptor read
Frame reception
Receive data transfer Descriptor write-back Descriptor read
Receive data transfer Descriptor write-back Descriptor read (receive ready for the next frame)
Reception completed
Figure 12.5 Sample Reception Flowchart
Rev. 6.00 Jul. 15, 2009 Page 303 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.3.4
Multi-Buffer Frame Transmit/Receive Processing
Multi-Buffer Frame Transmit Processing If an error occurs during multi-buffer frame transmission, the processing shown in figure 12.6 is carried out by the E-DMAC. Where the transmit descriptor is shown as inactive (TACT bit = 0) in the figure, buffer data has already been transmitted normally, and where the transmit descriptor is shown as active (TACT bit = 1), buffer data has not been transmitted. If a frame transmit error occurs in the first descriptor part where the transmit descriptor is active (TACT bit = 1), transmission is halted, and the TACT bit cleared to 0, immediately. The next descriptor is then read, and the position within the transmit frame is determined on the basis of bits TFP1 and TFP0 (continuing [B'00] or end [B'01]). In the case of a continuing descriptor, the TACT bit is cleared to 0, only, and the next descriptor is read immediately. If the descriptor is the final descriptor, not only is the TACT bit cleared to 0, but write-back is also performed to the TFE and TFS bits at the same time. Data in the buffer is not transmitted between the occurrence of an error and write-back to the final descriptor. If error interrupts are enabled in the EtherC/E-DMAC status interrupt permission register (EESIPR), an interrupt is generated immediately after the final descriptor write-back.
Descriptors T A C T T D L E T F P 1 T F P 0
00 00 00 Inactivates TACT (change 1 to 0) E-DMAC Descriptor read Inactivates TACT Descriptor read Inactivates TACT Descriptor read Inactivates TACT Descriptor read Inactivates TACT and writes TFE, TFS 10 10 10 10 10 11
10 00 00 00 00 00 00 01 10 Buffer
Untransmitted data is not transmitted after error occurrence Descriptor is only processed.
Transmit error occurrence
One frame
Transmitted data Untransmitted data
Figure 12.6 E-DMAC Operation after Transmit Error
Rev. 6.00 Jul. 15, 2009 Page 304 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Multi-Buffer Frame Receive Processing If an error occurs during multi-buffer frame reception, the processing shown in figure 12.7 is carried out by the E-DMAC. Where the receive descriptor is shown as inactive (RACT bit = 0) in the figure, buffer data has already been received normally, and where the receive descriptor is shown as active (RACT bit = 1), this indicates a buffer for which reception has not yet been performed. If a frame receive error occurs in the first descriptor part where the RACT bit = 1 in the figure, reception is halted immediately and a status write-back to the descriptor is performed. If error interrupts are enabled in the EtherC/E-DMAC status interrupt permission register (EESIPR), an interrupt is generated immediately after the write-back. If there is a new frame receive request, reception is continued from the buffer after that in which the error occurred.
Descriptors R A C T 0 0 0 Inactivates RACT and writes RFE, RFS E-DMAC 1 Descriptor read Write-back 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 Buffer New frame reception continues from buffer 0 0 1 R D L E 0 0 0 R F P 1 1 0 0 R F P 0 0 0 0 Receive error occurrence Start of frame
Figure 12.7 E-DMAC Operation after Receive Error
.........
Received data Unreceived data
Rev. 6.00 Jul. 15, 2009 Page 305 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.4
12.4.1
Usage Notes
Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR)
When the status bits in EESR of the on-chip E-DMAC of the SH-Ether chip are used as interrupt sources, setting of the interrupt source may fail if software writes a 1 to the corresponding status bit in EESR to clear the bit and this coincides with setting of the status interrupt source in EESR by the EtherC or E-DMAC. Figure 12.8 shows an example of timing in the case where setting of the interrupt source in EESR has failed. (a) In this example, both the reception interrupt and transmission interrupt sources of EESR are used. Firstly, reception interrupt source A from the EtherC or E-DMAC sets bit A in EESR and an interrupt is generated. (b) The interrupt handler writes 1 to bit A to clear it. (c) If clearing of bit A by writing of a 1 and generation of the transmission-interrupt source B signal by the EtherC or E-DMAC take place simultaneously, bit A will be cleared but the status bit for transmission-interrupt source B in EESR might not be set.
(a) (b), (c) (c)
Internal clock (I) Reception interrupt source A generated by EtherC/E-DMAC Transmission interrupt source B generated by EtherC/E-DMAC
Simultaneous clearing of the bit by writing of a 1 and generation of interrupt source B.
Bit A in EESR Bit B in EESR Write access to EESR by software Data to be written to EESR
H'00000001
Reception interrupt source A is set in bit A of EESR.
Only bit A of EESR is cleared by software.
Failure to generate transmission interrupt source B due to non-setting of bit B.
Bit clearing by writing a 1 : Expected operation
Figure 12.8 Timing of the Case where Setting of the Interrupt Source Bit in EESR by the EDMAC Fails
Rev. 6.00 Jul. 15, 2009 Page 306 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(1)
Countermeasure
This problem does not occur with all of the bits in EESR. The description applies to some bits but not others. Table 12.1 shows whether the problem can occur with the individual bits and whether the state of the individual interrupt source is reflected in the descriptor. Table 12.1 EESR Bits for which This Problem can Occur and Reflection of Interrupt Sources in the Descriptor
Bit 31 30 29 28 27 26 Bit Name Status TWB TABT Reserved Write-back complete Reserved Reserved Reserved Transmit abort detected Possibility of Problem Yes Yes Reflection in Descriptor Reflected in TD0 bit8 (TFS8) Reflected in RD0 bit8 (RFS8) Reflected in TD0 bit31 (TACT) Reflected in RD0 bit31 (RACT) Reflected in RD0 bit9 (RFS9) Interrupt Source Transmit Transmit
25
RABT
Receive abort detected
No
Reception
24 23 22 21
RFCOF ADE ECI TC
Receive frame counter overflow Address error EtherC status register interrupt source Frame transmission complete
Yes No No Yes
Reception Others Others Transmit
20 19 18
TDE TFUF FR
Transmit descriptor empty Transmit FIFO underflow Frame received
No Yes No
Transmit Transmit Reception
17 16
RDE RFOF
Receive descriptor empty Receive FIFO overflow
No Yes
Reception Reception
Rev. 6.00 Jul. 15, 2009 Page 307 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 15 14 13 12
Bit Name Status Reserved Reserved Reserved Transmit frame length error
Possibility of Problem Yes
Reflection in Descriptor Reflected in TD0 bit4 (TFS4) Reflected in TD0 bit3 (TFS3) Reflected in TD0 bit2 (TFS2) Reflected in TD0 bit1 (TFS1) Reflected in TD0 bit0 (TFS0) Reflected in RD0 bit7 (RFS7) Reflected in RD0 bit5 (RFS5) Reflected in RD0 bit4 (RFS4) Reflected in RD0 bit3 (RFS3) Reflected in RD0 bit2 (RFS2) Reflected in RD0 bit1 (RFS1)
Interrupt Source Transmit
11
CND
Carrier not detected
Yes
Transmit
10
DLC
Loss of carrier detected
Yes
Transmit
9
CD
Delayed collision detected
Yes
Transmit
8
TRO
Transmit retry over
Yes
Transmit
7
RMAF
Multicast address frame received
No
Reception
6 5

Reserved Receive frame discard request asserted Residual-bit frame received
No
Reception
4
RRF
No
Reception
3
RTLF
Overly long frame received
No
Reception
2
RTSF
Overly short frame received
No
Reception
1
PRE
PHY receive error
No
Reception
Rev. 6.00 Jul. 15, 2009 Page 308 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Bit 0
Bit Name Status CERF CRC error in received frame
Possibility of Problem No
Reflection in Descriptor Reflected in RD0 bit0 (RFS0)
Interrupt Source Reception
"Yes": Setting of this interrupt source bit can fail. "No": Setting of this interrupt source bit does not fail.
Take the following countermeasures for bits where the problem can arise. * Bit 30 (TWB): Write-back complete interrupt source bit in EESR may not be set. Check the TACT bit in the transmit descriptor. TACT = 0 indicates that the transmission is complete. * Bit 26 (TABT): Transmit abort detection interrupt source bit in EESR may not be set. Since the state of the interrupt source is written back to the relevant descriptor, check the transmit descriptor (TD0) to confirm the error status. * Bit 24 (RFCOF): Receive frame counter overflow interrupt source bit in EESR may not be set. However, even if the software is not notified of the interrupt despite the frame counter having overflowed, the upper layer (e.g. TCP/IP) can recognize the error because this LSI discards the frame. After departure from the overflow state, storage in the receive FIFO proceeds normally from the head of the next frame. Therefore, no problem with the system arises. * Bit 21 (TC): Frame transmission complete interrupt source bit in EESR may not be set. For transmission-related processing, either procedure (a) or (b) given below is effective. (a) Transmission processing without interrupt handling of the frame transmission complete interrupt 1. Prepare multiple transmit descriptors so that multiple frames can be transmitted. 2. After setting the transmit descriptors, set bit 0 (TR) in the E-DMAC transmit request register (EDTRR) to start transmission. 3. Before setting the next frame for transmission in the descriptor (when a transmission task arises), check the TACT bit of the corresponding transmit descriptor. 4. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and set the TR bit in EDTRR to start transmission. If the TACT bit is set to 1, do not set the transmit descriptor until the next timing. (b) For systems where completion of the transmission of each frame must be confirmed (that is, set frame for transmission initiate transmission complete frame transmission set the next frame for transmission ...) 1. Check the TACT bit in the last descriptor of the frame for transmission and confirm that TACT = 0, which means that the transmission was completed.
Rev. 6.00 Jul. 15, 2009 Page 309 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
* Bit 19 (TFUF): Transmit FIFO underflow interrupt source bit in EESR may not be set. When this bit is used as an interrupt source but is not set when it should be, the software is not notified of the interrupt. However, the upper layer will recognize the error in the form of an underflow of the transmit FIFO. * Bit 16 (RFOF): Receive FIFO overflow interrupt source bit in EESR may not be set. Since the state of the interrupt source is written back to the relevant descriptor, check the receive descriptor (RD0) to confirm the error status. * Bit 11 (CND), bit 10 (DLC), bit 9 (CD), bit 8 (TRO): The interrupt source bits in EESR for the carrier not detected, loss of carrier detected, delayed collision detected, and transmit retry over interrupts may not be set. However, since the states of the interrupt sources are written back to the relevant descriptor, check the transmit descriptor (TD0) to confirm the error status. (2) Example of a countermeasure when the software configuration is based on the frame transmit complete interrupt
The following descriptions are of sample countermeasures for cases when software processing is based on the frame transmit complete interrupt (bit 21 (TC) in EESR). If the TC interrupt source bit (bit 21) in EESR is not set on completion of transmission, the system will continue to wait for the TC interrupt, leading to stoppage of transmission. This situation arises when the interrupt handler writes a 1 to clear the bit. The sample method given as case (a) below takes the above possibility into account and avoids the problem by monitoring the transmit descriptor in interrupt processing for interrupts other than the TC interrupt. The sample method given as case (b) below avoids the above problem by setting a timeout limit for retry processing when multiple transmit descriptors are in use. Note: The countermeasure should be the one that best suits the structure of your driver and other software.
Rev. 6.00 Jul. 15, 2009 Page 310 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(a)
Countermeasure by monitoring of the transmit descriptor in the processing of interrupts other than the frame transmit complete (TC) interrupt
1. Prepare multiple transmit descriptors so that multiple frames can be transmitted. 2. Provide a "condition flag" for use in step 5 and by interrupt handlers, and then turn off this flag. This flag serves as a condition flag into which the TACT bits of transmit descriptors are read out. 3. After setting the frame for transmission in the first descriptor, start transmission by setting bit 0 (TR) in the E-DMAC transmit request register (EDTRR). 4. Before setting the next frame for transmission in the transmit descriptor (when another transmission task arises), check the TACT bit in the corresponding transmit descriptor. 5. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and start transmission by setting the TR bit in EDTRR. If the TACT bit is set to 1, turn on the condition flag and make an OS service call (e.g. to acquire the semaphore) to place the transmission task in the waiting state. Note: Before setting the TR bit in EDTRR, always read the TR bit and make sure that TR = 0. 6. Wait until the transmission task leaves the waiting state. There are two conditions for making the OS service call (e.g. returning the semaphore) from the interrupt handler to take the task out of the waiting state. Generation of a TC interrupt Generation of an interrupt other than the TC interrupt while the condition flag is on and TACT = 0. Elimination of unwanted processing by checking the TACT bit is only possible when the condition flag is on. The condition flag should be turned off after the task has left the waiting state. 7. When the transmission task has left the waiting state and entered execution, set the transmit frame in the corresponding transmit descriptor and then set the TR bit in EDTRR to start transmission.
Rev. 6.00 Jul. 15, 2009 Page 311 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Transmission task
1. 2. Prepare multiple transmit descriptors. Prepare the condition flag and turn it off. Transmission starts After setting the transmit 3. descriptor, set the TR bit in EDTRR to 1.
Interrupt handler
Generation of EtherC/E-DMAC interrupt Save EESR and clear the bit by writing a 1. No
TC interrupt? Yes No End Interrupt other than TC? Yes Interrupt processing for interrupts other than TC No Is the condition flag on?
Next transmission task generated? Yes Read the TACT bit of the corresponding transmit descriptor.
Make an OS service call to bring the transmission task out of the waiting state.
No
4.
TACT = 0? Yes 5. Turn the condition flag on. Make an OS service call to place the transmission task in a waiting state.
No
Yes Read the TACT bit of the corresponding transmit descriptor. No TACT = 0?
5. After setting the corresponding transmit 7. descriptor, set the TR bit in EDTRR to 1.
6.
Has the transmission task been brought out of the waiting state by the interrupt handler? Yes
No
Yes Make an OS service call to bring the transmission task out of the waiting state. Turn off the condition flag.
TC: EESR frame transmission complete : Processing added as the countermeasure for the problem
End
Figure 12.9 Countermeasure by Monitoring the Transmit Descriptor in Processing of Interrupts Other than the Frame Transmit Complete (TC) Interrupt
Rev. 6.00 Jul. 15, 2009 Page 312 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(b)
Countermeasure by adding timeout processing
1. Prepare multiple transmit descriptors so that multiple frames can be transmitted. 2. After setting the descriptors, set bit 0 (TR) in the E-DMAC transmit request register (EDTRR) to start transmission. 3. Before setting the next frame for transmission in the transmit descriptor (when a transmission task arises), check the TACT bit in the corresponding transmit descriptor. 4. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and set the TR bit in EDTRR to start transmission. If the TACT bit is set to 1, place the transmission task in a waiting state by making an OS service call of a routine with a timeout function (e.g. acquire a semaphore that has a timeout). Note: Before setting the TR bit in EDTRR, always read the TR bit and make sure that TR = 0. 5. When the transmission task has left the waiting state and entered the execution state within the time limit, set the frame for transmission in the corresponding transmit descriptor and then set the TR bit in EDTRR to start transmission. Taking the transmission task out of the waiting state should be done by the interrupt handler when the TC interrupt is generated. 6. When the timeout limit is reached, check the TACT bit in the corresponding transmit descriptor. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and set the TR bit in EDTRR to start transmission. If the TACT bit is set to 1, place the transmission task in a waiting state by making an OS service call of a routine with a timeout function, or execute a software reset to initialize all of the modules associated with Ethernet functionality.
Rev. 6.00 Jul. 15, 2009 Page 313 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Transmission task
1.
Interrupt handler
Generation of EtherC/E-DMAC interrupt Save EESR and clear the bit by writing a 1.
No
Prepare multiple transmit descriptors. Transmission starts.
2.
After setting the transmit descriptor, set the TR bit in EDTRR to 1. TC interrupt? Next transmission task generated?
Yes No Yes
End
Make an OS service call to bring the transmission task out of the waiting state.
Read the TACT bit of the corresponding transmit descriptor.
Interrupt other than TC?
Yes
No
3.
No TACT = 0? Yes
Interrupt processing for interrupts other than TC
End
4. After setting the corresponding transmit 5. descriptor, set the TR bit in EDTRR to 1.
4. Place the transmission task in a waiting
state by calling an OS service routine with a timeout function.
Has the transmission task left the waiting state within the specified time?
Yes
No
Timeout
6.
Read the TACT bit of the corresponding transmit descriptor.
No TACT = 0? Yes
TC: EESR frame transmission complete : Processing added as the countermeasure for the problem
Figure 12.10 Method of Adding Timeout Processing
Rev. 6.00 Jul. 15, 2009 Page 314 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
12.4.2
Usage Notes on SH-Ether Transmit-FIFO Underflow
In the transmission operation of the on-chip E-DMAC of the SH-Ether, if the E-DMAC cannot acquire bus-mastership due to occupancy of the bus by a bus master other than the E-DMAC, data are not writable to the transmit FIFO and an underflow occurs. The expected operation from that point is as follows: on obtaining the bus mastership, the E-DMAC resumes transmission of the remaining data for transmission; on completion of the DMA transfer, it writes back to the corresponding descriptor, and then fetches the next transmit descriptor. However, if the size of the transmit FIFO set by the FIFO depth register (FDR) maximum frame length for transmission (1518 bytes), the E-DMAC may stop operating even if the transmit request bit (TR) in the EDMAC transmit request register (EDTRR) is set to 1, according to the relationship between the length of the remaining frame data and the value of the transmit FIFO pointer. The relationship between the stoppage of E-DMAC operation and the state of the transmit FIFO is shown below. The data for transmission, which are placed in external memory (transmit buffer), are DMAtransferred by the E-DMAC to the transmit FIFO and output from the MII pin via the EtherC module. The transmit FIFO write pointer (WP) is used when the E-DMAC writes the data for transmission to the transmit FIFO, and the transmit FIFO read pointer (RP) is used when the EtherC module reads the data for transmission from the transmit FIFO. 1. After a software reset, the transmit FIFO will have been initialized, and WP and RP will hold the minimum and maximum values, respectively, of the transmit FIFO capacity. 2. When the E-DMAC starts DMA transfer, WP is incremented when the data for transmission are written to the transmit FIFO. On the other hand, RP is incremented when the data written to the transmit FIFO are read out by the EtherC module. Note: The transmit FIFO only stores the data of a single frame that is being processed. It does not store data extending over multiple frames. This means that the E-DMAC does not transfer the next frame to the transmit FIFO until the data of the frame being processed are read from the transmit FIFO. 3. If the E-DMAC fails to get the bus mastership for a system-related reason, the DMA transfer does not proceed and a transmit underflow occurs (WP = RP < frame length). Read access to the transmit FIFO by the EtherC is then terminated and RP is initialized (to the maximum value of the size of the transmit FIFO). 4. On again acquiring the bus mastership, the E-DMAC resumes DMA transfer of the remaining data of the frame. However, if the transmit FIFO becomes full despite a failure to write all of the remaining frame data from the point when the transmit FIFO underflowed, the E-DMAC waits for the transmit FIFO to become empty before transferring further remaining data.
Rev. 6.00 Jul. 15, 2009 Page 315 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
However, as stated in step 3, the read access to the transmit FIFO by the EtherC module will have been terminated, and the E-DMAC thus stops operating with the transmit FIFO full. In short, this problem arises when [initial value of RP - WP value < length of remaining frame data] at the point of the transmit underflow.
Data for transmission is written by the E-DMAC. Transmit FIFO Maximum transmit FIFO capacity RP Transmit FIFO
WP Increment Minimum WP transmit FIFO capacity
Increment RP
Data for transmission is read by EtherC 1. Initial state after software reset 2. Writing and reading of the data for transmission
Data for transmission is written by the E-DMAC. Transmit FIFO Maximum transmit FIFO capacity WP RP Initial state RP WP Transmit FIFO Transmit FIFO is full RP
Minimum transmit FIFO capacity Data for transmission is read by EtherC Reading of data for transmission by EtherC is terminated. 4. Point where the problem makes the E-DMAC stop WP: Transmit FIFO write pointer RP: Transmit FIFO read pointer
3. Transmit-FIFO underflow has occurred
Figure 12.11 Operation when E-DMAC Stops and the Transmit FIFO
Rev. 6.00 Jul. 15, 2009 Page 316 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(1)
Countermeasure
This problem occurs under this condition: size of transmit FIFO set in the FIFO depth register (FDR) maximum length of frame for transmission (1518bytes). To release the E-DMAC from the stopped state due to this problem, execute a software reset to initialize both the E-DMAC and EtherC modules. Specific countermeasures are given below. An example for the case where the software does not use TC interrupts in transmission processing is given as (2), and an example for the case with TC interrupt-driven software is given as (3). Both methods require the addition of timeout processing with a maximum specified time as the timeout limit, and are based on the countermeasures explained in section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR). The constant specified time corresponds to the timeout limit stated in section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR). The maximum specified time should be set with reference to the maximum times taking retry processing into consideration, as given in table 12.2. Derive n, the number of repetitions of the constant specified time, from this maximum specified time. If transfer takes more than the maximum specified time, this indicates that the EDMAC has stopped due to a transmission underflow. In this case, execute a software reset to initialize the EtherC and E-DMAC modules. Since the receiving side will also be initialized by the software reset, the receiving side may require processing in a higher-level layer (e.g. TCP/IP). Note: The countermeasure should be the one that best suits the structure of your driver and other software. (2) Countermeasure for the case where the software handles transmission without the aid of TC interrupts
The countermeasure described under (a), Processing transmission without handling of the frame transmission complete (TC) interrupt, below, is based on the method explained in the description of bit 21 in (1) Countermeasure of section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR).
Rev. 6.00 Jul. 15, 2009 Page 317 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(a) Processing transmission without handling of the frame transmission complete (TC) interrupt 1. Make initial settings for the timer. 2. Prepare multiple transmit descriptors so that multiple frames can be transmitted. 3. After setting the transmit descriptors, start transmission by setting bit 0 (TR) in the E-DMAC transmit request register (EDTRR). 4. Before setting the next frame for transmission in the transmit descriptor (when a transmission task arises), check the TACT bit in the corresponding transmit descriptor. 5. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and start transmission by setting the TR bit in EDTRR. If the TACT bit is set to 1, set counter i to 0 (counter i is the variable that indicates the number of repetitions of the timer operation to measure the specified constant period). 6. Start counting by the timer. 7. When the specified constant period has elapsed, stop the timer counter and check the TACT bit in the corresponding transmit descriptor. 8. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and set the TR bit in EDTRR to start transmission. If the TACT bit is set to 1, increment counter i. 9. While the TACT bit is found to be 1 in step 8 and the value of counter i is less than n, repeat steps 6 to 8 until the maximum specified time is reached (the maximum specified time should be set with reference to the maximum times in consideration of retry processing given in table 12.2, and from this maximum specified time, determine n, the number of repetitions of the specified constant period; n is determined by the user with reference to table 12.2). If counter i reaches or exceeds n, the maximum specified time has elapsed and we can judge that the E-DMAC has stopped due to a transmit underflow. Initialize the EtherC and E-DMAC modules by setting the software-reset bit SWR in the E-DMAC mode register (EDMR). After re-making initial settings for the Ethernet module, initialize the transmit/receive descriptors and transmit/receive buffers.
Rev. 6.00 Jul. 15, 2009 Page 318 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Transmission task
1. 2.
Make initial settings for the timer. Prepare multiple transmit descriptors.
Transmission starts.
3.
After setting the transmit descriptor, set the TR bit in EDTRR to 1.
Next transmission task generated?
Yes
No
End
Read the TACT bit of the corresponding transmit descriptor.
4.
No TACT = 0? Yes 5.
i = 0;
5. After setting the corresponding transmit 8. descriptor, set the TR bit in EDTRR to 1.
6.
Start the timer.
Specified constant 1 period elapsed? *
Yes 7.
No
Stop the timer. Read the TACT bit of the corresponding transmit descriptor.
No TACT = 0? Yes i++;
8.
9.
i >= n? * Yes
2
No
Issue a software reset to initialize the EtherC and E-DMAC modules. Make initial settings of the EtherC and E-DMAC modules. Initialize the transmit/receive descriptors and transmit/receive buffers.
Notes: 1. The specified constant period is the timeout period mentioned in section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR). 2. Set n with reference to the maximum specified time values in table 12.2. : Processing added as the countermeasure for the problem
Figure 12.12 Processing Transmission without Handling of the TC Interrupt
Rev. 6.00 Jul. 15, 2009 Page 319 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
(3)
Countermeasure for the case of TC interrupt-driven software
The sample countermeasure for the case of TC interrupt-driven software shown below is the addition of timeout processing within the limit imposed by the maximum specified time. This is based on the method explained in (b) Countermeasure by adding timeout processing in section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR). The maximum specified time should be set with reference to the maximum times in consideration of retry processing (table 12.2). From this maximum specified time, determine n, the number of calls of the OS service routine with a timeout function. (b) Countermeasure as the addition of timeout processing within the limit imposed by the maximum specified time 1. Prepare multiple transmit descriptors so that multiple frames can be transmitted. 2. After setting the transmit descriptors, start transmission by setting bit 0 (TR) in the E-DMAC transmit request register (EDTRR). 3. Before setting the next frame for transmission in the transmit descriptor (when a transmission task arises), check the TACT bit in the transmit descriptor. 4. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and start transmission by setting the TR bit in EDTRR. If the TACT bit is set to 1, set counter i to 0 (counter i is the variable that indicates the number of calls of the OS service routine with a timeout function). Then, place the transmission task in a waiting state by calling the OS routine (e.g. acquire a semaphore that has a timeout limit). Note: Before setting the TR bit in EDTRR, always read the TR bit and make sure that TR = 0. 5. When the transmission task has left the waiting state and entered the execution state within the specified constant period, set the frame for transmission in the corresponding transmit descriptor and then set the TR bit in EDTRR to start transmission. The transmission task should be taken out of the waiting state by the interrupt handler initiated by generation of the TC interrupt. 6. If the transmission task has not left the waiting state within the specified constant period, increment counter i. Then, if i < n, check the TACT bit in the corresponding transmit descriptor. The value for counting, n, is determined by the user with reference to table 12.2. 7. If the TACT bit is clear, set the frame for transmission in the corresponding transmit descriptor and set the TR bit in EDTRR to start transmission. If the TACT bit is set to 1, return the transmission task to the waiting state by calling an OS service routine that has a timeout function, and then repeat steps 5 and 6.
Rev. 6.00 Jul. 15, 2009 Page 320 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
8. If counter i reaches or exceeds n, the maximum specified time has elapsed and we can judge that the E-DMAC has stopped due to a transmit underflow. Initialize the EtherC and E-DMAC modules by setting the software-reset bit SWR in the E-DMAC mode register (EDMR). After re-making initial settings for the Ethernet module, initialize the transmit/receive descriptors and transmit/receive buffers.
Rev. 6.00 Jul. 15, 2009 Page 321 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Transmission task
1.
Interrupt handler
Generation of EtherC/E-DMAC interrupt Save EESR and clear the bit by writing 1.
No
Prepare multiple transmit descriptors.
Transmission starts.
2.
After setting the transmit descriptor, set the TR bit in EDTRR to 1.
TC interrupt?
No Yes
Next transmission task generated?
Yes
Make an OS service call to bring the transmission task out of the waiting state. End Interrupt other than TC?
Yes No
Read the TACT bit of the corresponding transmit descriptor.
3.
No TACT = 0? Yes
Interrupt processing for interrupts other than TC
End
4. After setting the corresponding transmit 5. descriptor, set the TR bit in EDTRR to 1.
i = 0;
4.
Call an OS service routine with a timeout function to place the transmission task in a waiting state.
Has the transmission task 1 left the waiting state within * he constant specified time?
Yes
No
5. 6.
Timeout
i++;
i < n? * Yes
2
No 8.
Read the TACT bit of the corresponding transmit descriptor.
Issue a software reset to initialize the EtherC and E-DMAC modules. Make initial settings of the EtherC and E-DMAC modules. Initialize the transmit/receive descriptors and transmit/receive buffers.
7.
TACT = 0? Yes
No
Notes: 1. The specified constant period is the timeout period mentioned in section 12.4.1, Usage Notes on SH-Ether EtherC/E-DMAC Status Register (EESR). 2. Set n with reference to the maximum specified time values in table 12.2. : Processing added as the countermeasure for the problem
Figure 12.13 Countermeasure for the Case with TC Interrupt-Driven Software: Addition of Timeout Processing within the Limit Imposed by the Maximum Specified Time
Rev. 6.00 Jul. 15, 2009 Page 322 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Table 12.2 Reference Values for Maximum Specified Time
Communication Rate Maximum Full-duplex with no flow specified time control Half-duplex with no flow control With flow control 10 Mbps 1.3 ms or longer 183 ms or longer (max. 366 ms) 336 ms or longer 100 Mbps 130 s or longer 18.3 ms or longer (max. 36.6 ms) 33.6 ms or longer
Note: The maximum specified time refers to the maximum time taken to transmit a single frame or the maximum time for flow control for a single frame.
Rev. 6.00 Jul. 15, 2009 Page 323 of 816 REJ09B0237-0600
Section 12 Ethernet Controller Direct Memory Access Controller (E-DMAC)
Rev. 6.00 Jul. 15, 2009 Page 324 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Section 13 Direct Memory Access Controller (DMAC)
This LSI includes the direct memory access controller (DMAC). The DMAC can be used in place of the CPU to perform high-speed transfers between external devices that have DACK (transfer request acknowledge signal), external memory, on-chip memory, memory-mapped external devices, and on-chip peripheral modules.
13.1
Features
* Four channels (two channels can receive an external request) * 4-Gbyte physical address space * Data transfer unit is selectable: Byte, word (2 bytes), longword (4 bytes), and 16 bytes (longword x 4) * Maximum transfer count: 16,777,216 transfers * Address mode: Dual address mode or single address mode can be selected. * Transfer requests: External request, on-chip peripheral module request, or auto request can be selected. The following modules can issue an on-chip peripheral module request. SCIF0, SCIF1, SCIF2, and SIOF0 * Selectable bus modes: Cycle steal mode (normal mode and intermittent mode) or burst mode can be selected. * Selectable channel priority levels: The channel priority levels are selectable between fixed mode and round-robin mode. * Interrupt request: An interrupt request can be generated to the CPU after transfers end by the specified counts. * External request detection: There are following four types of DREQ input detection. Low level detection High level detection Rising edge detection Falling edge detection * Transfer request acknowledge signal: Active levels for DACK and TEND can be set independently.
Rev. 6.00 Jul. 15, 2009 Page 325 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.1 shows the block diagram of the DMAC.
DMAC module On-chip memory On-chip peripheral module Iteration control SARn
DARn
Peripheral bus
Internal bus
Register control DMATCRn Start-up control
CHCRn
DMA transfer request signal DMA transfer acknowledge signal Interrupt controller DEIn Request priority control
DMAOR
DMASR0, DMASR1
External ROM External RAM External I/O (memory mapped) External I/O (with acknowledgement) DACK0, DACK1 TEND0, TEND1 DREQ0, DREQ1 Bus state controller
Bus interface
[Legend] SARn: DARn: DMATCRn: CHCRn: DMAOR: DMASR0, DMASR1: DEIn: n:
DMA source address register DMA destination address register DMA transfer count register DMA channel control register DMA operation register DMA extended resource selectors DMA transfer-end interrupt request to the CPU 0, 1, 2, 3
Figure 13.1 Block Diagram of DMAC
Rev. 6.00 Jul. 15, 2009 Page 326 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.2
Input/Output Pins
The external pins for the DMAC are described below. Table 13.1 lists the configuration of the pins that are connected to external bus. The DMAC has pins for 2 channels (channels 0 and 1) for external bus use. Table 13.1 Pin Configuration
Channel Name 0 DMA transfer request DMA transfer request acknowledge DMA transfer end 1 DMA transfer request DMA transfer request acknowledge DMA transfer end Pin Name DREQ0 DACK0 I/O Input Function DMA transfer request input from external device to channel 0
Output DMA transfer request acknowledge output from channel 0 to external device Output DMA transfer end of DMAC channel 0 output of Input DMA transfer request input from external device to channel 1
TEND0 DREQ1 DACK1
Output DMA transfer request acknowledge output from channel 1 to external device Output DMA transfer end of DMAC channel 1 output
TEND1
Rev. 6.00 Jul. 15, 2009 Page 327 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.3
Register Descriptions
The DMAC has the following registers. See section 24, List of Registers, for the addresses of these registers and the state of them in each processing status. The SAR for channel 0 is expressed such as SAR_0. Channel 0: * * * * DMA source address register_0 (SAR_0) DMA destination address register_0 (DAR_0) DMA transfer count register_0 (DMATCR_0) DMA channel control register_0 (CHCR_0)
Channel 1: * * * * DMA source address register_1 (SAR_1) DMA destination address register_1 (DAR_1) DMA transfer count register_1 (DMATCR_1) DMA channel control register _1 (CHCR_1)
Channel 2: * * * * DMA source address register_2 (SAR_2) DMA destination address register_2 (DAR_2) DMA transfer count register_2 (DMATCR_2) DMA channel control register_2 (CHCR_2)
Channel 3: * * * * DMA source address register_3 (SAR_3) DMA destination address register_3 (DAR_3) DMA transfer count register_3 (DMATCR_3) DMA channel control register_3 (CHCR_3)
Common: * DMA operation register (DMAOR) * DMA extended resource selector 0 (DMARS0) * DMA extended resource selector 1 (DMARS1)
Rev. 6.00 Jul. 15, 2009 Page 328 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.3.1
DMA Source Address Registers 0 to 3 (SAR_0 to SAR_3)
SAR are 32-bit readable/writable registers that specify the source address of a DMA transfer. During a DMA transfer, these registers indicate the next source address. When the data is transferred from an external device with the DACK in single address mode, the SAR is ignored. To transfer data in 16 bits or in 32 bits, specify the address with 16-bit or 32-bit address boundary. When transferring data in 16-byte units, a 16-byte boundary must be set for the source address value. The initial value is undefined. 13.3.2 DMA Destination Address Registers 0 to 3 (DAR_0 to DAR_3)
DAR are 32-bit readable/writable registers that specify the destination address of a DMA transfer. During a DMA transfer, these registers indicate the next destination address. When the data is transferred from an external device with the DACK in single address mode, the DAR is ignored. To transfer data in 16 bits or in 32 bits, specify the address with 16-bit or 32-bit address boundary. When transferring data in 16-byte units, a 16-byte boundary must be set for the destination address value. The initial value is undefined. 13.3.3 DMA Transfer Count Registers 0 to 3 (DMATCR_0 to DMATCR_3)
DMATCR are 32-bit readable/writable registers that specify the DMA transfer count. The number of transfers is 1 when the setting is H'00000001, 16,777,215 when H'00FFFFFF is set, and 16,777,216 (the maximum) when H'00000000 is set. During a DMA transfer, these registers indicate the remaining transfer count. The upper eight bits of DMATCR are always read as 0, and the write value should always be 0. To transfer data in 16 bytes, one 16-byte transfer (128 bits) counts one. The initial value is undefined.
Rev. 6.00 Jul. 15, 2009 Page 329 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.3.4
DMA Channel Control Registers 0 to 3 (CHCR_0 to CHCR_3)
CHCR are 32-bit readable/writable registers that control the DMA transfer mode.
Bit 31 to 24 Bit Name Initial Value All 0 R/W R Descriptions Reserved These bits are always read as 0. The write value should always be 0. 23 DO 0 R/W DMA Overrun Selects whether DREQ is detected by overrun 0 or by overrun 1. This bit is valid only in CHCR_0 and CHCR_1. This bit is always reserved and read as 0 in CHCR_2 and CHCR_3. The write value should always be 0. 0: Detects DREQ by overrun 0 1: Detects DREQ by overrun 1 22 TL 0 R/W Transfer End Level Specifies whether the TEND signal output is high active or low active. This bit is valid only in CHCR_0 and CHCR_1. This bit is always reserved and read as 0 in CHCR2 and CHCR_3. The write value should always be 0. 0: Low-active output of TEND 1: High-active output of TEND 21 to 18 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 17 AM 0 R/W Acknowledge Mode Selects whether DACK is output in data read cycle or in data write cycle in dual address mode. In single address mode, DACK is always output regardless of the specification by this bit. This bit is valid only in CHCR_0 and CHCR_1. This bit is always reserved and read as 0 in CHCR_2 and CHCR_3. The write value should always be 0. 0: DACK output in read cycle (dual address mode) 1: DACK output in write cycle (dual address mode)
Rev. 6.00 Jul. 15, 2009 Page 330 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bit 16
Bit Name AL
Initial Value 0
R/W R/W
Descriptions Acknowledge Level Specifies whether the DACK signal output is high active or low active. This bit is valid only in CHCR_0 and CHCR_1. This bit is always reserved and read as 0 in CHCR_2 and CHCR_3. The write value should always be 0. 0: Low-active output of DACK 1: High-active output of DACK
15 14
DM1 DM0
0 0
R/W R/W
Destination Address Mode 1, 0 Specify whether the DMA destination address is incremented, decremented, or left fixed. (In single address mode, the DM1 and DM0 bits are ignored when data is transferred to an external device with DACK.) 00: Fixed destination address (setting prohibited in 16byte transfer) 01: Destination address is incremented (+1 in byte-unit transfer, +2 in word-unit transfer, +4 in longwordunit transfer, +16 in 16-byte transfer) 10: Destination address is decremented (-1 in byte-unit transfer, -2 in word-unit transfer, -4 in longwordunit transfer; setting prohibited in 16-byte transfer) 11: Setting prohibited
13 12
SM1 SM0
0 0
R/W R/W
Source Address Mode 1, 0 Specify whether the DMA source address is incremented, decremented, or left fixed. (In single address mode, SM1 and SM0 bits are ignored when data is transferred from an external device with DACK.) 00: Fixed source address (setting prohibited in 16-byte transfer) 01: Source address is incremented (+1 in byte-unit transfer, +2 in word-unit transfer, +4 in longwordunit transfer, +16 in 16-byte transfer) 10: Source address is decremented (-1 in byte-unit transfer, -2 in word-unit transfer, -4 in longwordunit transfer; setting prohibited in 16-byte transfer) 11: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 331 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bit 11 10 9 8
Bit Name RS3 RS2 RS1 RS0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Descriptions Resource Select 3 to 0 Specify which transfer requests will be sent to the DMAC. The changing of transfer request source should be done in the state that the DMA enable bit (DE) is set to 0.
0 0 0 0 0 0 0 0 1 0 1 0 External request, dual address mode Setting prohibited External request, single address mode External address space External device with DACK 0 0 1 1 External request, single address mode External device with DACK External address space 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 Auto request Setting prohibited Setting prohibited Setting prohibited Selected by DMA extended resource selector Setting prohibited Setting prohibited Setting prohibited Setting prohibited Setting prohibited Setting prohibited Setting prohibited
Note: External request specification is valid only in CHCR_0 and CHCR_1. None of the external request can be selected in CHCR_2 and CHCR_3.
Rev. 6.00 Jul. 15, 2009 Page 332 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bit 7 6
Bit Name DL DS
Initial Value 0 0
R/W R/W R/W
Descriptions DREQ Level and DREQ Edge Select Specify the detecting method of the DREQ pin input and the detecting level. These bits are valid only in CHCR_0 and CHCR_1. These bits are always reserved and read as 0 in CHCR_2 and CHCR_3. The write value should always be 0. In channels 0 and 1, also, if the transfer request source is specified as an on-chip peripheral module or if an autorequest is specified, these bits are invalid. 00: DREQ detected in low level 01: DREQ detected at falling edge 10: DREQ detected in high level 11: DREQ detected at rising edge
5
TB
0
R/W
Transfer Bus Mode Specifies the bus mode when DMA transfers data. 0: Cycle steal mode 1: Burst mode
4 3
TS1 TS0
0 0
R/W R/W
Transfer Size 1, 0 Specify the size of data to be transferred. Select the size of data to be transferred when the source or destination is an on-chip peripheral module register of which transfer size is specified. 00: Byte size 01: Word size (2 bytes) 10: Longword size (4 bytes) 11: 16-byte unit (four longword transfers)
2
IE
0
R/W
Interrupt Enable Specifies whether or not an interrupt request is generated to the CPU at the end of the DMA transfer. Setting this bit to 1 generates an interrupt request (DEI) to the CPU when the TE bit is set to 1. 0: Interrupt request is disabled. 1: Interrupt request is enabled.
Rev. 6.00 Jul. 15, 2009 Page 333 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bit 1
Bit Name TE
Initial Value 0
R/W
Descriptions
R/(W)* Transfer End Flag Shows that DMA transfer ends. The TE bit is set to 1 when data transfer ends when DMATCR becomes to 0. The TE bit is not set to 1 in the following cases. * * DMA transfer ends due to an NMI interrupt or DMA address error before DMATCR is cleared to 0. DMA transfer is ended by clearing the DE bit and DME bit in the DMA operation register (DMAOR).
To clear the TE bit, the TE bit should be written to 0 after reading 1. Even if the DE bit is set to 1 while this bit is set to 1, transfer is not enabled. 0: During the DMA transfer or DMA transfer has been interrupted [Clearing condition] Writing 0 after TE = 1 read 1: DMA transfer ends by the specified count (DMATCR = 0) 0 DE 0 R/W DMA Enable Enables or disables the DMA transfer. In auto request mode, DMA transfer starts by setting the DE bit and DME bit in DMAOR to 1. In this time, all of the bits TE, NMIF, and AE in DMAOR must be 0. In an external request or peripheral module request, DMA transfer starts if DMA transfer request is generated by the devices or peripheral modules after setting the bits DE and DME to 1. In this case, however, all of the bits TE, NMIF, and AE must be 0, which is the same as in the case of auto request mode. Clearing the DE bit to 0 can terminate the DMA transfer. 0: DMA transfer disabled 1: DMA transfer enabled Note: * Writing 0 is possible to clear the flag.
Rev. 6.00 Jul. 15, 2009 Page 334 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
[Notice] About the TE bit (Transfer End Flag) of DMA Channel Control Registers (CHCR) in DMAC; Just when a flag is set to 1, if the flag is read, the read data will be 0, but the internal state will be the same as reading 1. In that case, if the flag is written 0, the flag will be cleared as 0, because the internal state is the same as reading 1. [Workaround] In the case of using a flag of DMAC, to protect unintended bit clear to 0, please write it as following. (1) In the case of intended bit clear, please write 0 after reading 1 to the flag. (2) In the other cases, please write 1 to the flag. If the flag is not used, it is no problem to write 0 to flag (in the case of intended bit clear, write 0 after reading 1 to the flag).
Rev. 6.00 Jul. 15, 2009 Page 335 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.3.5
DMA Operation Register (DMAOR)
DMAOR is a 16-bit readable/writable register that specifies the priority level of channels at the DMA transfer. This register shows the DMA transfer status.
Bit 15, 14 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 13 12 CMS1 CMS0 0 0 R/W R/W Cycle Steal Mode Select 1, 0 Select either normal mode or intermittent mode in cycle steal mode. It is necessary that all channel's bus modes are set to cycle steal mode to make valid intermittent mode. 00: Normal mode 01: Setting prohibited 10: Intermittent mode 16 Executes one DMA transfer in each of 16 clocks of an external bus clock. 11: Intermittent mode 64 Executes one DMA transfer in each of 64 clocks of an external bus clock. 11, 10 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 9 8 PR1 PR0 0 0 R/W R/W Priority Mode 1, 0 Select the priority level between channels when there are transfer requests for multiple channels simultaneously. 00: CH0 > CH1 > CH2 > CH3 01: CH0 > CH2 > CH3 > CH1 10: Setting prohibited 11: Round-robin mode 7 to 3 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 336 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bit 2
Bit Name AE
Initial Value 0
R/W
Description
R/(W)* Address Error Flag Indicates that an address error occurred during DMA transfer. If this bit is set, DMA transfer is disabled even if the DE bit in CHCR and the DME bit in DMAOR are set to 1. This bit can only be cleared by writing 0 after reading 1. 0: No DMAC address error [Clearing condition] Writing AE = 0 after AE = 1 read 1: DMAC address error occurs
1
NMIF
0
R/(W)* NMI Flag Indicates that an NMI interrupt occurred. If this bit is set, DMA transfer is disabled even if the DE bit in CHCR and the DME bit in DMAOR are set to 1. This bit can only be cleared by writing 0 after reading 1. When the NMI is input, the DMA transfer in progress can be done in one transfer unit. When the DMAC is not in operational, the NMIF bit is set to 1 even if the NMI interrupt was input. 0: No NMI interrupt [Clearing condition] Writing NMIF = 0 after NMIF = 1 read 1: NMI interrupt occurs
0
DME
0
R/W
DMA Master Enable Enables or disables DMA transfers on all channels. If the DME bit and the DE bit in CHCR are set to 1, transfer is enabled. In this time, all of the bits TE in CHCR, NMIF, and AE in DMAOR must be 0. If this bit is cleared during transfer, transfers in all channels are terminated. 0: Disables DMA transfers on all channels 1: Enables DMA transfers on all channels
Note:
*
Writing 0 is possible to clear the flag.
Rev. 6.00 Jul. 15, 2009 Page 337 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
[Notice] About the AE bit (Address Error Flag) and the NMIF bit (NMIF Flag) of DMA Operation Register (DMAOR) in DMAC; Just when a flag is set to 1, if the flag is read, the read data will be 0, but the internal state will be the same as reading 1. In that case, if the flag is written 0, the flag will be cleared as 0, because the internal state is the same as reading 1. [Workaround] In the case of using a flag of DMAC, to protect unintended bit clear to 0, please write it as following. (1) In the case of intended bit clear, please write 0 after reading 1 to the flag. (2) In the other cases, please write 1 to the flag. If the flag is not used, it is no problem to write 0 to flag (in the case of intended bit clear, write 0 after reading 1 to the flag). If an interrupt is generated by the flag and the flag causing the interrupt is read in an interrupt handler routine, this case does not apply to the foregoing notice. However if there is a possibility that another flag bit in the register is set at the timing of reading the register, please follow the workaround described above.
Rev. 6.00 Jul. 15, 2009 Page 338 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.3.6
DMA Extended Resource Selectors 0 and 1 (DMARS0 and DMARS1)
DMARS are 16-bit readable/writable registers that specify the DMA transfer request sources from peripheral modules in each channel. DMARS0 specifies the sources for channels 0 and 1, and DMARS1 specifies the sources for channels 2 and 3. This register can set the transfer request of SCIF0, SCIF1, SCIF2, and SIOF0. When MID/RID other than the values listed in table 13.2 is set, the operation of this LSI is not guaranteed. The transfer request from DMARS is valid only when the resource select bits (RS3 to RS0) has been set to B'1000 for CHCR_0 to CHCR_3 registers. Otherwise, even if DMARS has been set, transfer request source is not accepted. * DMARS0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit Name C1MID5 C1MID4 C1MID3 C1MID2 C1MID1 C1MID0 C1RID1 C1RID0 C0MID5 C0MID4 C0MID3 C0MID2 C0MID1 C0MID0 C0RID1 C0RID0 Initial Value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W Transfer request register ID1 and ID0 for DMA channel 0 (RID) See table 13.2. Transfer request register ID1 and ID0 for DMA channel 1 (RID) See table 13.2. Transfer request module ID5 to ID0 for DMA channel 0 (MID) See table 13.2. Description Transfer request module ID5 to ID0 for DMA channel 1 (MID) See table 13.2.
Rev. 6.00 Jul. 15, 2009 Page 339 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
* DMARS1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit Name C3MID5 C3MID4 C3MID3 C3MID2 C3MID1 C3MID0 C3RID1 C3RID0 C2MID5 C2MID4 C2MID3 C2MID2 C2MID1 C2MID0 C2RID1 C2RID0 Initial Value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W Transfer request register ID1 and ID0 for DMA channel 2 (RID) See table 13.2. Transfer request register ID1 and ID0 for DMA channel 3 (RID) See table 13.2. Transfer request module ID5 to ID0 for DMA channel 2 (MID) See table 13.2. Description Transfer request module ID5 to ID0 for DMA channel 3 (MID) See table 13.2.
Table 13.2 Transfer Request Sources
Peripheral Module SCIF0 Setting Value for One Channel (MID + RID) H'21 H'22 SCIF1 H'25 H'26 SCIF2 H'29 H'2A SIOF0 H'51 H'52 010100 001010 001001 MID 001000 RID 01 10 01 10 01 10 01 10 Function Transmit Receive Transmit Receive Transmit Receive Transmit Receive
Rev. 6.00 Jul. 15, 2009 Page 340 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.4
Operation
When there is a DMA transfer request, the DMAC starts the transfer according to the predetermined channel priority; when the transfer end conditions are satisfied, it ends the transfer. Transfers can be requested in three modes: auto request, external request, and on-chip peripheral module request. In bus mode, burst mode or cycle steal mode can be selected. 13.4.1 DMA Transfer Flow
After the DMA source address registers (SAR), DMA destination address registers (DAR), DMA transfer count registers (DMATCR), DMA channel control registers (CHCR), DMA operation register (DMAOR), and DMA extended resource selectors (DMARS) are set, the DMAC transfers data according to the following procedure: 1. Checks to see if transfer is enabled (DE = 1, DME = 1, TE = 0, AE = 0, NMIF = 0) 2. When a transfer request occurs while transfer is enabled, the DMAC transfers one transfer unit of data (depending on the TS0 and TS1 settings). In auto request mode, the transfer begins automatically when the DE bit and DME bit are set to 1. The DMATCR value will be decremented for each transfer. The actual transfer flows vary by address mode and bus mode. 3. When the specified number of transfer have been completed (when DMATCR reaches 0), the transfer ends normally. If the IE bit in CHCR is set to 1 at this time, a DEI interrupt is sent to the CPU. 4. When an address error or an NMI interrupt is generated, the transfer is aborted. Transfers are also aborted when the DE bit in CHCR or the DME bit in DMAOR is changed to 0.
Rev. 6.00 Jul. 15, 2009 Page 341 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.2 shows a flowchart of this procedure.
Start Initial settings (SAR, DAR, DMATCR, CHCR, DMAOR, DMARS)
DE, DME = 1 and NMIF, AE, TE = 0? Yes Transfer request occurs?*1 Yes
No
No
*2 *3 Bus mode, transfer request mode, DREQ detection selection system
Transfer (1 transfer unit); DMATCR - 1 DMATCR, SAR and DAR updated
DMATCR = 0?
No
NMIF = 1 or AE = 1 or DE = 0 or DME = 0? Yes Transfer aborted
No
Yes TE = 1 DEI interrupt request (when IE = 1) NMIF = 1 or AE = 1 or DE = 0 or DME = 0? Yes Transfer end
No
Normal end
Notes: 1. In auto-request mode, transfer begins when the NMIF, AE, and TE bits are all 0 and the DE and DME bits are set to 1. 2. DREQ = level detection in burst mode (external request) or cycle-steal mode. 3. DREQ = edge detection in burst mode (external request), or auto-request mode in burst mode.
Figure 13.2 DMA Transfer Flowchart
Rev. 6.00 Jul. 15, 2009 Page 342 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.4.2
DMA Transfer Requests
DMA transfer requests are basically generated in either the data transfer source or destination, but they can also be generated by external devices or on-chip peripheral modules that are neither the source nor the destination. Transfers can be requested in three modes: auto request, external request, and on-chip peripheral module request. The request mode is selected in the RS3 to RS0 bits in DMARS0 and DMARS 1. Auto-Request Mode: When there is no transfer request signal from an external source, as in a memory-to-memory transfer or a transfer between memory and an on-chip peripheral module unable to request a transfer, auto-request mode allows the DMAC to automatically generate a transfer request signal internally. When the DE bits in CHCR and the DME bit in DMAOR are set to 1, the transfer begins so long as the AE and NMIF bits in DMAOR are all 0. External Request Mode: In this mode, a transfer is performed at the request signals (DREQ0 and DREQ1) of an external device. This mode is valid only in channel 0 and channel 1. Choose one of the modes shown in table 13.3 according to the application system. When this mode is selected, if the DMA transfer is enabled (DE = 1, DME = 1, TE = 0, AE = 0, NMIF = 0), a transfer is performed upon a request at the DREQ input. Table 13.3 Selecting External Request Modes with RS Bits
RS3 0 RS2 0 RS1 0 1 RS0 0 0 Address Mode Dual address mode Single address mode Source Any External memory, memory-mapped external device External device with DACK Destination Any External device with DACK External memory, memory-mapped external device
1
Choose to detect DREQ by either the edge or level of the signal input with the DL bit and DS bit in CHCR_0 and CHCR_1 as shown in table 13.4. The source of the transfer request does not have to be the data transfer source or destination.
Rev. 6.00 Jul. 15, 2009 Page 343 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Table 13.4 Selecting External Request Detection with DL, DS Bits
CHCR_0 or CHCR_1 DL 0 DS 0 1 1 0 1 Detection of External Request Low level detection Falling edge detection High level detection Rising edge detection
When DREQ is accepted, the DREQ pin becomes request accept disabled state. After issuing acknowledge signal DACK for the accepted DREQ, the DREQ pin again becomes request accept enabled state. When DREQ is used by level detection, there are following two cases by the timing to detect the next DREQ after outputting DACK. * Overrun 0: Transfer is aborted after the same number of transfer has been performed as requests. * Overrun 1: Transfer is aborted after transfers have been performed for (the number of requests plus 1) times. The DO bit in CHCR selects this overrun 0 or overrun 1. Table 13.5 Selecting External Request Detection with DO Bit
CHCR_0 or CHCR_1 DO 0 1 External Request Overrun 0 Overrun 1
On-Chip Peripheral Module Request Mode: In this mode, a transfer is performed at the transfer request signal of an on-chip peripheral module. Transfer request signals comprise the transmit data empty transfer request and receive data full transfer request from the SCIF0, SCIF1, SCIF2, and SIOF0 set by DMARS0 and DMARS 1. When this mode is selected, if the DMA transfer is enabled (DE = 1, DME = 1, TE = 0, AE = 0, NMIF = 0), a transfer is performed upon the input of a transfer request signal.
Rev. 6.00 Jul. 15, 2009 Page 344 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
When a transmit data empty transfer request of the SCIF0 is set as the transfer request, the transfer destination must be the SCIF0's transmit data register. Likewise, when receive data full transfer request of the SCIF0 is set as the transfer request, the transfer source must be the SCIF0's receive data register. These conditions also apply to the SCIF1, SCIF2, and SIOF0. The number of the receive FIFO triggers can be set as a transfer request depending on an on-chip peripheral module. Data needs to be read after the DMA transfer is ended, because data may be remained in the receive FIFO when the receive FIFO trigger condition is not satisfied. Table 13.6 Selecting On-Chip Peripheral Module Request Modes with RS3 to RS0 Bits
CHCR RS[3:0] 1000 DMARS MID 001000 RID 01 10 001001 01 10 001010 01 10 010100 01 10 DMA Transfer DMA Transfer Request Source Request Signal SCIF0 transmitter SCIF0 receiver SCIF1 transmitter SCIF1 receiver SCIF2 transmitter SCIF2 receiver SIOF0 transmitter SIOF0 receiver TXI0 (transmit FIFO data empty interrupt) RXI0 (receive FIFO data full interrupt) TXI1 (transmit FIFO data empty interrupt) RXI1 (receive FIFO data full interrupt) TXI2 (transmit FIFO data empty interrupt) RXI2 (receive FIFO data full interrupt) TXI0 (transmit FIFO data empty interrupt) RXI0 (receive FIFO data full interrupt) Bus Mode Cycle steal Cycle steal Cycle steal Cycle steal Cycle steal Cycle steal Cycle steal Cycle steal
Source Any SCFRDR0 Any SCFRDR1 Any SCFRDR2 Any SIRDR0
Destination SCFTDR0 Any SCFTDR0 Any SCFTDR2 Any SITDR0 Any
13.4.3
Channel Priority
When the DMAC receives simultaneous transfer requests on two or more channels, it transfers data according to a predetermined priority. Two modes (fixed mode and round-robin mode) are selected by the PR1 and PR0 bits in DMAOR. Fixed Mode: In this mode, the priority levels among the channels remain fixed. There are two kinds of fixed modes as follows: * CH0 > CH1 > CH2 > CH3 * CH0 > CH2 > CH3 > CH1 These are selected by the PR1 and the PR0 bits in DMAOR.
Rev. 6.00 Jul. 15, 2009 Page 345 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Round-Robin Mode: In round-robin mode each time data of one transfer unit (word, byte, longword, or 16-byte unit) is transferred on one channel, the priority is rotated. The channel on which the transfer was just finished rotates to the bottom of the priority. The round-robin mode operation is shown in figure 13.3. The priority of round-robin mode is CH0 > CH1 > CH2 > CH3 immediately after a reset. When round-robin mode is specified, the same bus mode, either cycle steal mode or burst mode, must be specified for all of the channels.
(1) When channel 0 is transferred Initial priority order CH0 > CH1 > CH2 > CH3 CH1 > CH2 > CH3 > CH0 Channel 0 becomes bottom priority
Priority order after transfer
(2) When channel 1 is transferred Channel 1 becomes bottom priority. The priority of channel 0, which was higher than channel 1, is also shifted.
Initial priority order
CH0 > CH1 > CH2 > CH3
Priority order after transfer
CH2 > CH3 > CH0 > CH1
(3) When channel 2 is transferred CH0 > CH1 > CH2 > CH3 Channel 2 becomes bottom priority. The priority of channels 0 and 1, which were higher than channel 2, are also shifted. If immediately after there is a request to transfer channel 1 only, channel 1 becomes bottom priority and the priority of channels 0 and 3, which were higher than channel 1, are also shifted.
Initial priority order
Priority order after transfer
CH3 > CH0 > CH1 > CH2
Post-transfer priority order when there is an CH2 > CH3 > CH0 > CH1 immediate transfer request to channel 1 only
(4) When a channel 3 is transferred Initial priority order Priority order after transfer CH0 > CH1 > CH2 > CH3 CH0 > CH1 > CH2 > CH3 Priority order does not change.
Figure 13.3 Round-Robin Mode
Rev. 6.00 Jul. 15, 2009 Page 346 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.4 shows how the priority changes when channel 0 and channel 3 transfers are requested simultaneously and a channel 1 transfer is requested during the channel 0 transfer. The DMAC operates as follows: 1. Transfer requests are generated simultaneously to channels 0 and 3. 2. Channel 0 has a higher priority, so the channel 0 transfer begins first (channel 3 waits for transfer). 3. A channel 1 transfer request occurs during the channel 0 transfer (channels 1 and 3 are both waiting) 4. When the channel 0 transfer ends, channel 0 becomes lowest priority. 5. At this point, channel 1 has a higher priority than channel 3, so the channel 1 transfer begins (channel 3 waits for transfer). 6. When the channel 1 transfer ends, channel 1 becomes lowest priority. 7. The channel 3 transfer begins. 8. When the channel 3 transfer ends, channels 3 and 2 shift downward in priority so that channel 3 becomes the lowest priority.
Transfer request Waiting channel(s) DMAC operation Channel priority
(1) Channels 0 and 3 (3) Channel 1 3 (2) Channel 0 transfer starts Priority order changes 0>1>2>3
1,3
(4) Channel 0 transfer ends (5) Channel 1 transfer starts
1>2>3>0
3
(6) Channel 1 transfer ends
Priority order changes
2>3 >0>1
(7) Channel 3 transfer starts None (8) Channel 3 transfer ends
Priority order changes
0>1>2>3
Figure 13.4 Changes in Channel Priority in Round-Robin Mode
Rev. 6.00 Jul. 15, 2009 Page 347 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.4.4
DMA Transfer Types
DMA transfer has two types; single address mode transfer and dual address mode transfer. They depend on the number of bus cycles of access to source and destination. A data transfer timing depends on the bus mode, which has cycle steal mode and burst mode. The DMAC supports the transfers shown in table 13.7. Table 13.7 Supported DMA Transfers
Destination External Device with External DACK Memory Not available Dual, single MemoryMapped External Device Dual, single Dual Dual Dual On-Chip Peripheral Module Not available Dual Dual Dual
Source External device with DACK External memory Memory-mapped external device On-chip peripheral module
X/Y Memory U Memory Not available Dual Dual Dual
Dual, single Dual Dual, single Dual Not available Dual
Notes: 1. Dual: Dual address mode 2. Single: Single address mode 3. For on-chip peripheral modules, 16-byte transfer is available only by registers which can be accessed in longword units.
Rev. 6.00 Jul. 15, 2009 Page 348 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Address Modes: * Dual Address Mode In dual address mode, both the transfer source and destination are accessed by an address. The source and destination can be located externally or internally. DMA transfer requires two bus cycles because data is read from the transfer source in a data read cycle and written to the transfer destination in a data write cycle. At this time, transfer data is temporarily stored in the DMAC. In the transfer between external memories as shown in figure 13.5, data is read to the DMAC from one external memory in a data read cycle, and then that data is written to the other external memory in a write cycle.
DMAC SAR DAR Memory
Address bus
Data bus
Transfer source module Transfer destination module
Data buffer
The SAR value is an address, data is read from the transfer source module, and the data is temporarily stored in the DMAC. First bus cycle DMAC SAR Memory
Address bus
DAR
Data bus
Transfer source module Transfer destination module
Data buffer
The DAR value is an address and the value stored in the data buffer in the DMAC is written to the transfer destination module. Second bus cycle
Figure 13.5 Data Flow of Dual Address Mode Auto request, external request, and on-chip peripheral module request are available for the transfer request. DACK can be output in read cycle or write cycle in dual address mode. The channel control register (CHCR) can specify whether the DACK is output in read cycle or write cycle.
Rev. 6.00 Jul. 15, 2009 Page 349 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.6 shows an example of DMA transfer timing in dual address mode.
CKIO
A25 to A0
Transfer source address
Transfer destination address
CSn
D31 to D0
RD WEn DACKn (Active-low)
Data read cycle (1st cycle)
Data write cycle (2nd cycle)
Note: In transfer between external memories, with DACK output in the read cycle, DACK output timing is the same as that of CSn.
Figure 13.6 Example of DMA Transfer Timing in Dual Mode (Source: Ordinary Memory, Destination: Ordinary Memory)
Rev. 6.00 Jul. 15, 2009 Page 350 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
* Single Address Mode In single address mode, either the transfer source or transfer destination peripheral device is accessed (selected) by means of the DACK signal, and the other device is accessed by an address. In this mode, the DMAC performs one DMA transfer in one bus cycle, accessing one of the external devices by outputting the DACK transfer request acknowledge signal to it, and at the same time outputting an address to the other device involved in the transfer. For example, in the case of transfer between external memory and an external device with DACK shown in figure 13.7, when the external device outputs data to the data bus, that data is written to the external memory in the same bus cycle.
External address bus This LSI DMAC External memory External data bus
External device with DACK
DACK DREQ
Data flow
Figure 13.7 Data Flow in Single Address Mode Two kinds of transfer are possible in single address mode: (1) transfer between an external device with DACK and a memory-mapped external device, and (2) transfer between an external device with DACK and external memory. In both cases, only the external request signal (DREQ) is used for transfer requests.
Rev. 6.00 Jul. 15, 2009 Page 351 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.8 shows an example of DMA transfer timing in single address mode.
CKIO A25 to A0 CSn WE D31 to D0 DACKn Address output to external memory space Select signal to external memory space Write strobe signal to external memory space Data output from external device with DACK DACK signal (active-low) to external device with DACK (a) External device with DACK external memory space (ordinary memory) CKIO A25 to A0 CSn RD D31 to D0 DACKn Address output to external memory space Select signal to external memory space Read strobe signal to external memory space Data output from external memory space DACK signal (active-low) to external device with DACK (b) External memory space (ordinary memory) external device with DACK
Figure 13.8 Example of DMA Transfer Timing in Single Address Mode Bus Modes: There are two bus modes: cycle steal mode and burst mode. Select the mode in the TB bits in the channel control register (CHCR). * Cycle-Steal Mode Normal mode In cycle-steal normal mode, the bus mastership is given to another bus master after a onetransfer-unit (byte, word, longword, or 16-byte unit) DMA transfer. When another transfer request occurs, the bus mastership is obtained from the other bus master and a transfer is performed for one transfer unit. When that transfer ends, the bus mastership is passed to the other bus master. This is repeated until the transfer end conditions are satisfied. In cycle-steal normal mode, transfer areas are not affected regardless of settings of the transfer request source, transfer source, and transfer destination. Figure 13.9 shows an example of DMA transfer timing in cycle-steal normal mode. Transfer conditions shown in the figure are: Dual address mode DREQ low level detection
Rev. 6.00 Jul. 15, 2009 Page 352 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
DREQ Bus mastership returned to CPU once Bus cycle CPU CPU CPU DMAC DMAC Read/Write CPU DMAC DMAC CPU
Read/Write
Figure 13.9 DMA Transfer Example in Cycle-Steal Normal Mode (Dual Address, DREQ Low Level Detection) Intermittent mode 16 and intermittent mode 64 In intermittent mode of cycle steal, the DMAC returns the bus mastership to other bus master whenever a unit of transfer (byte, word, longword, or 16-byte unit) is complete. If the next transfer request occurs after that, the DMAC gets the bus mastership from other bus master after waiting for 16 or 64 clocks in B count. The DMAC then transfers data of one unit and returns the bus mastership to other bus master. These operations are repeated until the transfer end condition is satisfied. It is thus possible to make lower the ratio of bus occupation by DMA transfer than cycle-steal normal mode. When the DMAC gets again the bus mastership, DMA transfer can be postponed in case of entry updating due to cache miss. This intermittent mode can be used for all transfer section; transfer request source, transfer source, and transfer destination. The bus modes, however, must be cycle steal mode in all channels.
Rev. 6.00 Jul. 15, 2009 Page 353 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Figure 13.10 shows an example of DMA transfer timing in cycle steal intermittent mode. Transfer conditions shown in the figure are: Dual address mode DREQ low level detection
DREQ More than 16 or 64 B (change by the CPU, LCDC, and USBH states of using bus)
Bus cycle
CPU
CPU
CPU DMAC DMAC
Read/Write
CPU
CPU
DMAC DMAC
Read/Write
CPU
Figure 13.10 Example of DMA Transfer in Cycle Steal Intermittent Mode (Dual Address, DREQ Low Level Detection) * Burst Mode In burst mode, once the DMAC obtains the bus mastership, the transfer is performed continuously without releasing the bus mastership until the transfer end condition is satisfied. In external request mode with level detection of the DREQ pin, however, when the DREQ pin is not active, the bus mastership passes to the other bus master after the DMAC transfer request that has already been accepted ends, even if the transfer end conditions have not been satisfied. Burst mode cannot be used when the on-chip peripheral module is the transfer request source. Figure 13.11 shows DMA transfer timing in burst mode.
DREQ Bus cycle CPU CPU CPU DMAC DMAC DMAC DMAC DMAC DMAC Read Write Read Write Read Write CPU
Figure 13.11 DMA Transfer Example in Burst Mode (Dual Address, DREQ Low Level Detection)
Rev. 6.00 Jul. 15, 2009 Page 354 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Relationship between Request Modes and Bus Modes by DMA Transfer Category: Table 13.8 shows the relationship between request modes and bus modes by DMA transfer category. Table 13.8 Relationship between Request Modes and Bus Modes by DMA Transfer Category
Address Mode Transfer Category Dual External device with DACK and external memory Request Bus Mode Mode External B/C B/C B/C B/C B/C C C C B/C B/C Transfer Size (Bits) 8/16/32/128 8/16/32/128 8/16/32/128 8/16/32/128 8/16/32/128 Usable Channels 0,1 0, 1 0 to 5*4 0 to 5*4 0 to 5*4
External device with DACK and memory- External mapped external device External memory and external memory External memory and memory-mapped external device Memory-mapped external device and memory-mapped external device External memory and on-chip peripheral module Memory-mapped external device and on-chip peripheral module On-chip peripheral module and on-chip peripheral module Single External device with DACK and external memory All*1 All*
1
All*1 All*2 All*2 All*2 External
8/16/32/128*3 0 to 5*4 8/16/32/128*3 0 to 5*4 8/16/32/128*3 0 to 5*4 8/16/32 8/16/32 0, 1 0, 1
External device with DACK and memory- External mapped external device
B: Burst mode, C: Cycle steal mode Notes: 1. External requests and auto requests are all available. 2. External requests, auto requests, and on-chip peripheral module requests are all available. However, for on-chip peripheral module requests, the request source register must be designated as the transfer source or the transfer destination. 3. Access size permitted for the on-chip peripheral module register functioning as the transfer source or transfer destination. 4. If the transfer request is an external request, channels 0 and 1 are only available.
Rev. 6.00 Jul. 15, 2009 Page 355 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Bus Mode and Channel Priority: When the priority is set in fixed mode (CH0 > CH1), even though channel 1 is transferring in burst mode, if there is a transfer request to channel 0 which has a higher priority, the transfer of channel 0 will begin immediately. At this time, if channel 0 is also operating in burst mode, the channel 1 transfer will continue when the channel 0 transfer with a higher priority has completely finished. If channel 0 is operating in cycle steal mode, immediately after channel 0 with a higher priority completes the transfer of one transfer unit, the channel 1 transfer will begin again without releasing the bus mastership. Transfer will then switch between the two in the order of channel 0, channel 1, channel 0, and channel 1. For the bus state, the CPU cycle after cycle steal mode transfer finishes is replaced with a burst mode transfer cycle (hereafter referred to as burst mode high-priority execution). This example is illustrated in figure 13.12. If there are channels with conflicting burst transfers, transfer for the channel with the highest priority is performed first. In DMA transfer for more than one channel, the DMAC does not give the bus mastership to the bus master until all conflicting burst transfers have finished.
CPU
DMA CH1
DMA CH1
DMA CH0 CH0
DMA CH1 CH1
DMA CH0 CH0
DMA CH1
DMA CH1
CPU
CPU
DMAC CH1 Burst mode
DMAC CH0 and CH1 Cycle-steal mode
DMAC CH1 Burst mode
CPU
Priority: CH0 > CH1 CH0: Cycle-steal mode CH1: Burst mode
Figure 13.12 Bus State when Multiple Channels are Operating In round-robin mode, the priority changes according to the specifications shown in figure 13.3. Note that a channel operating in cycle steal mode cannot be handled together with a channel operating in burst mode.
Rev. 6.00 Jul. 15, 2009 Page 356 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.4.5
Number of Bus Cycle States and DREQ Pin Sampling Timing
Number of Bus Cycle States: When the DMAC is the bus master, the number of bus cycle states is controlled by the bus state controller (BSC) in the same way as when the CPU is the bus master. For details, see section 7, Bus State Controller (BSC). DREQ Pin Sampling Timing: Figures 13.13, 13.14, 13.15, and 13.16 show the sample timing of the DREQ input in each bus mode, respectively.
CKIO Bus cycle DREQ (Rising edge) DACK (High-active) CPU CPU 1st acceptance Non-sensitive period DMAC CPU 2nd acceptance
Acceptance started
Figure 13.13 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection
CKIO Bus cycle DREQ (Overrun 0, high-level) DACK (High-active) CPU 1st acceptance CPU DMAC CPU 2nd acceptance
Non-sensitive period
Acceptance started
CKIO Bus cycle DREQ (Overrun 1, high-level) DACKn (High-active) CPU 1st acceptance CPU DMAC CPU 2nd acceptance
Non-sensitive period
Non-sensitive period
Acceptance started
Figure 13.14 Example of DREQ Input Detection in Cycle Steal Mode Level Detection
Rev. 6.00 Jul. 15, 2009 Page 357 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
CKIO Bus cycle DREQ (Rising edge) DACK (High-active) CPU CPU Burst acceptance DMAC DMAC
Non-sensitive period
Figure 13.15 Example of DREQ Input Detection in Burst Mode Edge Detection
CKIO Bus cycle DREQ (Overrun 0, high-level) DACK (High-active) CPU 1st acceptance CPU DMAC 2nd acceptance
Non-sensitive period
Acceptance started
CKIO Bus cycle DREQ (Overrun 1, high-level) DACK (High-active) Acceptance started Acceptance started CPU 1st acceptance CPU DMAC 2nd acceptance DMAC 3rd acceptance
Non-sensitive period
Figure 13.16 Example of DREQ Input Detection in Burst Mode Level Detection
Rev. 6.00 Jul. 15, 2009 Page 358 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
CKIO Last DMA transfer Bus cycle DREQ DMAC CPU DMAC CPU CPU
DACK
TEND
Figure 13.17 Example of DMA Transfer End in Cycle Steal Mode Level Detection When an 8-bit or 16-bit external device is accessed in longword units, or when an 8-bit external device is accessed in word units, the DACK output is divided because of the data alignment. This example is illustrated in figure 13.18.
Rev. 6.00 Jul. 15, 2009 Page 359 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
T1 CKIO
T2
Taw
T1
T2
Address
CS
RD
Data WEn DACKn (Active-low) WAIT
Note: The DACK is asserted for the last transfer unit of the DMA transfer. When the transfer unit is divided into several bus cycles and the CS is negated between bus cycles, the DACK is also divided.
Figure 13.18 Example of BSC Ordinary Memory Access (No Wait, Idle Cycle 1, Longword Access to 16-Bit Device)
Rev. 6.00 Jul. 15, 2009 Page 360 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.5
Usage Notes
Pay attentions to the following notes when the DMAC is used. 13.5.1 Notes on DACK Pin Output
When burst mode and cycle steal mode are simultaneously set in two or more channels, an additional DACK may be asserted at the end of burst transfer. This phenomenon will occur when all of the conditions described below are satisfied. 1. When the DMA transfer is simultaneously performed in two or more channels support both burst mode and cycle steal mode 2. When the channel to be used in burst mode is set to dual address mode, and DACK is output in data write cycle 3. When the DMAC cannot obtain the bus mastership consecutively even though a transfer demand of cycle steal has been received after the completion of burst transfer This phenomenon is avoided by taking either of three measures shown below. * Measure 1 After confirming the completion of burst transfer (TE bit = 1), perform the DMA transfer of other cycle steal mode * Measure 2 The channel to be used in burst mode should not be set to output DACK in data write cycle * Measure 3 When the DMA transfer is simultaneously performed in two or more channels, set all of the channels to burst mode or cycle steal mode
Rev. 6.00 Jul. 15, 2009 Page 361 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.5.2 (1)
Notes On DREQ Sampling When DACK is Divided in External Access
Error Phenomenon
When the DACK output is divided in an external access, DREQ may be sampled twice at maximum in the external access. (2) Error Conditions and Phenomenon
Conditions: The DACK output is divided in an external access when: * 16-byte access, * 32-bit access to the 8-bit space, * 16-bit access to the 8-bit space, or * 32-bit access to the 16-bit space is performed with either of the following idle cycle settings made: * Idle cycles between write-write cycles (IWW = 01 or more) * Idle cycles between read-read cycles in the same spaces (IWRRS = 01 or more) * External wait mask specification (WM = 0). In addition to the above conditions, the following conditions are included depending on the detection method of DREQ. * For DREQ level detection: only write access * For DREQ edge detection: both write access and read access Phenomenon: The detection timings of the DREQ pin in the above access are shown in figures 13.19 to 13.22.
CKIO
Bus cycle
CPU 1st acceptance 2nd acceptance
DMAC write or read
DREQ (Rising edge) Non-sensitive period DACK (High-active) Non-sensitive period
3rd acceptance possible
Figure 13.19 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection When DACK is Divided to 4 by Idle Cycles
Rev. 6.00 Jul. 15, 2009 Page 362 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
CKIO
Bus cycle DREQ (Rising edge) DACK (High-active)
CPU 1st acceptance Non-sensitive period
DMAC write or read 2nd acceptance 3rd acceptance is after the Non-sensitive period next DACK assertion
Figure 13.20 Example of DREQ Input Detection in Cycle Steal Mode Edge Detection When DACK is Divided to 2 by Idle Cycles
CKIO CPU 1st acceptance Non-sensitive period 2nd acceptance DMAC write 3rd acceptance possible
Bus cycle DREQ (Overrun 0, high-level) DACK (High-active)
Non-sensitive period
CKIO CPU 1st acceptance 2nd acceptance DMAC write 3rd acceptance possible
Bus cycle DREQ (Overrun 1, high-level) DACK (High-active)
Non-sensitive period Non-sensitive period
Figure 13.21 Example of DREQ Input Detection in Cycle Steal Mode Level Detection When DACK is Divided to 4 by Idle Cycles
Rev. 6.00 Jul. 15, 2009 Page 363 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
CKIO CPU 1st acceptance Non-sensitive period DMAC write 2nd acceptance 3rd acceptance possible Non-sensitive period
Bus cycle DREQ (Overrun 0, high-level) DACK (High-active)
CKIO
Bus cycle DREQ (Overrun 1, high-level) DACK (High-active)
CPU 1st acceptance
DMAC write 2nd acceptance 3rd acceptance possible
Non-sensitive period Non-sensitive period
Figure 13.22 Example of DREQ Input Detection in Cycle Steal Mode Level Detection When DACK is Divided to 2 by Idle Cycles (3) Notes
For the external access described in (2) above, note the following. 1. When the DREQ edge is detected, input one DREQ edge at maximum in the bus cycle. 2. When the DREQ level is detected in overrun 0, negate the DREQ input in the bus cycle after the detection of the first DACK output negation and before the second DACK output negation. 3. When the DREQ level is detected in overrun 1, negate DREQ input after the detection of the first DACK output assertion and before the second DACK output assertion.
Rev. 6.00 Jul. 15, 2009 Page 364 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
13.5.3
Other Notes
1. Before making a transition to standby mode, either wait until DMA transfer finishes or suspend DMA transfer. 2. If an on-chip peripheral module whose clock supply is to be stopped by the module standby function is performing DMA transfer, either wait until DMA transfer finishes or suspend DMA transfer before making a transition to module standby mode. 3. Do not write to SAR, DAR, DMATCR, or DMARS during DMA transfer. Concerning Above Notes 1 and 2: DMA transfer end can be confirmed by checking whether the TE bit in CHCR is set to 1. To suspend DMA transfer, clear the DE bit in CHCR to 0.
Rev. 6.00 Jul. 15, 2009 Page 365 of 816 REJ09B0237-0600
Section 13 Direct Memory Access Controller (DMAC)
Rev. 6.00 Jul. 15, 2009 Page 366 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
Section 14 Compare Match Timer (CMT)
This LSI has an on-chip compare match timer (CMT) consisting of a 2-channel 16-bit timer. The CMT has a16-bit counter, and can generate interrupts at set intervals.
14.1
Features
CMT has the following features. * Selection of four counter input clocks Any of four internal clocks (P/8, P/32, P/128, and P/512) can be selected independently for each channel. * Interrupt request on compare match * When not in use, CMT can be stopped by halting its clock supply to reduce power consumption. Figure 14.1 shows a block diagram of CMT.
P/32 P/512 P/128 P/32 P/512 P/128
CMI0
P/8
CMI1
P/8
Control circuit
Clock selection
Control circuit
Clock selection
Comparator
Comparator
CMCOR0
CMCOR1
CMCSR0
CMCSR1
CMCNT0
Channel 0 Module bus CMT [Legend] CMSTR: CMCSR: CMCOR: CMCNT: CMI:
CMCNT1
CMSTR0
Channel 1
Bus interface
Internal bus Compare match timer start register Compare match timer control/status register Compare match timer constant register Compare match counter Compare match interrupt
Figure 14.1 Block Diagram of Compare Match Timer
Rev. 6.00 Jul. 15, 2009 Page 367 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.2
Register Descriptions
The CMT has the following registers. * * * * * * * * Compare match timer start register (CMSTR) Compare match timer control/status register_0 (CMCSR_0) Compare match counter_0 (CMCNT_0) Compare match constant register_0 (CMCOR_0) Compare match timer start register_1 (CMSTR_1) Compare match timer control/status register_1 (CMCSR_1) Compare match counter_1 (CMCNT_1) Compare match constant register_1 (CMCOR_1) Compare Match Timer Start Register (CMSTR)
14.2.1
CMSTR is a 16-bit register that selects whether compare match counter (CMCNT) operates or is stopped. CMSTR is initialized to H'0000 by a power-on reset and a transition to standby mode.
Bit 15 to 2 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 1 STR1 0 R/W Count Start 1 Specifies whether compare match counter 1 operates or is stopped. 0: CMCNT_1 count is stopped 1: CMCNT_1 count is started 0 STR0 0 R/W Count Start 0 Specifies whether compare match counter 0 operates or is stopped. 0: CMCNT_0 count is stopped 1: CMCNT_0 count is started
Rev. 6.00 Jul. 15, 2009 Page 368 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.2.2
Compare Match Timer Control/Status Register (CMCSR)
CMCSR is a 16-bit register that indicates compare match generation, enables interrupts and selects the counter input clock. CMCSR is initialized to H'0000 by a power-on reset and a transition to standby mode.
Bit 15 to 8 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 CMF 0 R/(W)* Compare Match Flag Indicates whether or not the values of CMCNT and CMCOR match. 0: CMCNT and CMCOR values do not match [Clearing condition] When 0 is written to this bit 1: CMCNT and CMCOR values match 6 CMIE 0 R/W Compare Match Interrupt Enable Enables or disables compare match interrupt (CMI) generation when CMCNT and CMCOR values match (CMF=1). 0: Compare match interrupt (CMI) disabled 1: Compare match interrupt (CMI) enabled 5 to 2 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 369 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
Bit 1 0
Bit Name CKS1 CKS0
Initial value 0 0
R/W R/W R/W
Description Clock Select 1 and 0 Select the clock to be input to CMCNT from four internal clocks obtained by dividing the peripheral operating clock (P). When the STR bit in CMSTR is set to 1, CMCNT starts counting on the clock selected with bits CKS1 and CKS0. 00: P/8 01: P/32 10: P/128 11: P/512
Note: *
Only 0 can be written, to clear the flag.
14.2.3
Compare Match Counter (CMCNT)
CMCNT is a 16-bit register used as an up-counter. When the counter input clock is selected with bits CKS1 and CKS0 in CMCSR and the STR bit in CMSTR is set to 1, CMCNT starts counting using the selected clock. When the value in CMCNT and the value in compare match constant register (CMCOR) match, CMCNT is cleared to H'0000 and the CMF flag in CMCSR is set to 1. CMCNT is initialized to H'0000 by a power-on reset and a transition to standby mode. 14.2.4 Compare Match Constant Register (CMCOR)
CMCOR is a 16-bit register that sets the interval up to a compare match with CMCNT. CMCOR is initialized to H'FFFF by a power-on reset and is initialized to H'FFFF in standby mode.
Rev. 6.00 Jul. 15, 2009 Page 370 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.3
14.3.1
Operation
Interval Count Operation
When an internal clock is selected with bits CKS1 and CKS0 in CMCSR and the STR bit in CMSTR is set to 1, CMCNT starts incrementing using the selected clock. When the values in CMCNT and CMCOR match, CMCNT is cleared to H'0000 and the CMF flag in CMCSR is set to 1. When the CMIE bit in CMCSR is set to 1, a compare match interrupt (CMI) is requested. CMCNT then starts counting up again from H'0000. Figure 14.2 shows the operation of the compare match counter.
CMCNT1 value
Counter cleared by compare match with CMCOR1
CMCOR1
H'0000
Time
Figure 14.2 Counter Operation 14.3.2 CMCNT Count Timing
One of four internal clocks (P/8, P/32, P/128, and P/512) obtained by dividing the P clock can be selected with bits CKS1 and CKS0 in CMCSR. Figure 14.3 shows the timing.
Peripheral operating clock (P) Nth clock N (N + 1)th clock N+1
Count clock
CMCNT1
Figure 14.3 Count Timing
Rev. 6.00 Jul. 15, 2009 Page 371 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.4
14.4.1
Interrupts
Interrupt Sources
The CMT has channels and each of them to which a different vector address is allocated has compare match interrupt. When both the interrupt request flag (CMF) and interrupt enable bit (CMIE) are set to 1, the corresponding interrupt request is output. When the interrupt is used to activate a CPU interrupt, the priority of channels can be changed by the interrupt controller settings. For details, see section 6, Interrupt Controller (INTC). 14.4.2 Timing of Setting Compare Match Flag
When CMCOR and CMCNT match, a compare match signal is generated and the CMF bit in CMCSR is set to 1. The compare match signal is generated in the last cycle in which the values match (when the CMCNT value is updated to H'0000). That is, after a match between CMCOR and CMCNT, the compare match signal is not generated until the next CMCNT counter clock input. Figure 14.4 shows the timing of CMF bit setting.
Peripheral operating clock (P)
Counter clock
(N + 1)th clock
CMCNT1
N
0
CMCOR1
N
Compare match signal
Figure 14.4 Timing of CMF Setting 14.4.3 Timing of Clearing Compare Match Flag
The CMF bit in CMCSR is cleared by reading 1 from this bit, then writing 0.
Rev. 6.00 Jul. 15, 2009 Page 372 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.5
14.5.1
Usage Notes
Conflict between Write and Compare-Match Processes of CMCNT
When the compare match signal is generated in the T2 cycle while writing to CMCNT, clearing CMCNT has priority over writing to it. In this case, CMCNT is not written to. Figure 14.5 shows the timing to clear the CMCNT counter.
CMCSR write cycle T1 Peripheral operating clock (P)
T2
Address
CMCNT
Internal write
Counter clear
CMCNT
N
H'0000
Figure 14.5 Conflict between Write and Compare-Match Processes of CMCNT
Rev. 6.00 Jul. 15, 2009 Page 373 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.5.2
Conflict between Word-Write and Count-Up Processes of CMCNT
Even when the count-up occurs in the T2 cycle while writing to CMCNT in words, the writing has priority over the count-up. In this case, the count-up is not performed. Figure 14.6 shows the timing to write to CMCNT in words.
CMCSR write cycle T1 Peripheral operating clock (P)
T2
Address
CMCNT
Internal write
CMCNT count-up enable
CMCNT
N
M
Figure 14.6 Conflict between Word-Write and Count-Up Processes of CMCNT
Rev. 6.00 Jul. 15, 2009 Page 374 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
14.5.3
Conflict between Byte-Write and Count-Up Processes of CMCNT
Even when the count-up occurs in the T2 cycle while writing to CMCNT in bytes, the byte-writing has priority over the count-up. In this case, the count-up is not performed. The byte data on another side, which is not written to, is also not counted and the previous contents remain. Figure 14.7 shows the timing when the count-up occurs in the T2 cycle while writing to CMCNT in bytes.
CMCSR write cycle T1 Peripheral operating clock (P)
T2
Address
CMCNTH
Internal write
CMCNT count-up enable
CMCNTH
N
M
CMCNTL
X
X
Figure 14.7 Conflict between Byte-Write and Count-Up Processes of CMCNT 14.5.4 Conflict between Write Processes to CMCNT with the Counting Stopped and CMCOR
Writing the same value to CMCNT with the counting stopped and CMCOR is prohibited. If written, the CMF flag in CMCSR is set to 1 and CMCNT is cleared to H'0000.
Rev. 6.00 Jul. 15, 2009 Page 375 of 816 REJ09B0237-0600
Section 14 Compare Match Timer (CMT)
Rev. 6.00 Jul. 15, 2009 Page 376 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Section 15 Serial Communication Interface with FIFO (SCIF)
15.1 Overview
This LSI has a three-channel serial communication interface with FIFO (SCIF) that supports both asynchronous and clock synchronous serial communication. It also has 16-stage FIFO registers for both transmission and reception independently for each channel that enable this LSI to perform efficient high-speed continuous communication. 15.1.1 Features
* Asynchronous serial communication: Serial data communication is performed by start-stop in character units. The SCIF can communicate with a universal asynchronous receiver/transmitter (UART), an asynchronous communication interface adapter (ACIA), or any other communications chip that employs a standard asynchronous serial system. There are eight selectable serial data communication formats. Data length: 7 or 8 bits Stop bit length: 1 or 2 bits Parity: Even, odd, or none Receive error detection: Parity, framing, and overrun errors Break detection: Break is detected when a framing error is followed by at least one frame at the space 0 level (low level). It is also detected by reading the RxD level directly from the port data register when a framing error occurs. * Synchronous mode: Serial data communication is synchronized with a clock signal. The SCIF can communicate with other chips having a synchronous communication function. There is one serial data communication format. Data length: 8 bits Receive error detection: Overrun errors * Full duplex communication: The transmitting and receiving sections are independent, so the SCIF can transmit and receive simultaneously. Both sections use 16-stage FIFO buffering, so high-speed continuous data transfer is possible in both the transmit and receive directions. * On-chip baud rate generator with selectable bit rates
Rev. 6.00 Jul. 15, 2009 Page 377 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
* Internal or external transmit/receive clock source: From either baud rate generator (internal) or SCK pin (external) * Four types of interrupts: Transmit-FIFO-data-empty, break, receive-FIFO-data-full, and receive-error interrupts are requested independently. * When the SCIF is not in use, it can be stopped by halting the clock supplied to it, saving power. * In asynchronous, on-chip modem control functions (RTS and CTS) (only for channel 1 and channel 0). * The number of data in the transmit and receive FIFO registers and the number of receive errors of the receive data in the receive FIFO register can be ascertained. * A time-out error (DR) can be detected when receiving in asynchronous mode.
Rev. 6.00 Jul. 15, 2009 Page 378 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Figure 15.1 shows a block diagram of the SCIF for each channel.
Bus interface
Module data bus
Internal data bus
SCSMR SCFRDR (16 stage) SCFTDR (16 stage) SCLSR SCFDR SCFCR RxD SCRSR SCTSR SCFSR SCSCR SCSPTR Transmission/ reception control TxD Parity generation Parity check SCK CTS RTS Clock
SCBRRn
P Baud rate generator P/4 P/16 P/64
External clock TXI RXI ERI BRI SCIF
[Legend] SCRSR: Receive shift register SCFRDR: Receive FIFO data register SCTSR: Transmit shift register SCFTDR: Transmit FIFO data register SCSMR: Serial mode register SCSCR: Serial control register
SCFSR: Serial status register SCBRR: Bit rate register SCSPTR: Serial port register SCFCR: FIFO control register SCFDR: FIFO data count register SCLSR: Line status register
Figure 15.1 Block Diagram of SCIF
Rev. 6.00 Jul. 15, 2009 Page 379 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.2
Pin Configuration
The SCIF has the serial pins summarized in table 15.1. Table 15.1 SCIF Pins
Channel 0 Pin Name Serial clock pin Receive data pin Transmit data pin Request to send pin Clear to send pin 1 Serial clock pin Receive data pin Transmit data pin Request to send Clear to send pin 2 Serial clock pin Receive data pin Transmit data pin Abbreviation SCK0 RxD0 TxD0 RTS0 CTS0 SCK1 RxD1 TxD1 RTS1 CTS1 SCK2 RxD2 TxD2 I/O I/O Input Output I/O I/O I/O Input Output Output Input I/O Input Output Function Clock I/O Receive data input Transmit data output Request to send Clear to send Clock I/O Receive data input Transmit data output Request to send Clear to send Clock I/O Receive data input Transmit data output
Rev. 6.00 Jul. 15, 2009 Page 380 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3
Register Description
The SCIF has the following registers. These registers specify the data format and bit rate, and control the transmitter and receiver sections. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Receive FIFO data register_0 (SCFRDR_0) Transmit FIFO data register_0 (SCFTDR_0) Serial mode register_0 (SCSMR_0) Serial control register_0 (SCSCR_0) Serial status register_0 (SCFSR_0) Bit rate register_0 (SCBRR_0) FIFO control register_0 (SCFCR_0) FIFO data count register_0 (SCFDR_0) Serial port register_0 (SCSPTR_0) Line status register_0 (SCLSR_0) Receive FIFO data register_1 (SCFRDR_1) Transmit FIFO data register_1 (SCFTDR_1) Serial mode register_1 (SCSMR_1) Serial control register_1 (SCSCR_1) Serial status register_1 (SCFSR_1) Bit rate register_1 (SCBRR_1) FIFO control register_1 (SCFCR_1) FIFO data count register_1 (SCFDR_1) Serial port register_1 (SCSPTR_1) Line status register_1 (SCLSR_1) Receive FIFO data register_2 (SCFRDR_2) Transmit FIFO data register_2 (SCFTDR_2) Serial mode register_2 (SCSMR_2) Serial control register_2 (SCSCR_2) Serial status register_2 (SCFSR_2) Bit rate register_2 (SCBRR_2) FIFO control register_2 (SCFCR_2) FIFO data count register_2 (SCFDR_2) Serial port register_2 (SCSPTR_2) Line status register_2 (SCLSR_2)
Rev. 6.00 Jul. 15, 2009 Page 381 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.1
Receive Shift Register (SCRSR)
SCRSR receives serial data. Data input at the RxD pin is loaded into SCRSR in the order received, LSB (bit 0) first, converting the data to parallel form. When one byte has been received, it is automatically transferred to SCFRDR, the receive FIFO data register. The CPU cannot read or write to SCRSR directly. 15.3.2 Receive FIFO Data Register (SCFRDR)
SCFRDR is a 16-stage 8-bit FIFO register that stores serial receive data. The SCIF completes the reception of one byte of serial data by moving the received data from the receive shift register (SCRSR) into SCFRDR for storage. Continuous reception is possible until 16 bytes are stored. The CPU can read but not write to SCFRDR. If data is read when there is no receive data in the SCFRDR, the value is undefined. When this register is full of receive data, subsequent serial data is lost. SCFRDR is initialized to undefined value by a power-on reset.
Bit 7 to 0 Bit Name Initial value R/W Description FIFO for transmits serial data
Undefined R
15.3.3
Transmit Shift Register (SCTSR)
SCTSR transmits serial data. The SCIF loads transmit data from the transmit FIFO data register (SCFTDR) into SCTSR, then transmits the data serially from the TxD pin, LSB (bit 0) first. After transmitting one data byte, the SCIF automatically loads the next transmit data from SCFTDR into SCTSR and starts transmitting again. The CPU cannot read or write to SCTSR directly.
Rev. 6.00 Jul. 15, 2009 Page 382 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.4
Transmit FIFO Data Register (SCFTDR)
SCFTDR is a 16-stage 8-bit FIFO register that stores data for serial transmission. When the SCIF detects that the transmit shift register (SCTSR) is empty, it moves transmit data written in the SCFTDR into SCTSR and starts serial transmission. Continuous serial transmission is performed until there is no transmit data left in SCFTDR. SCFTDR can always be written to by the CPU. When SCFTDR is full of transmit data (16 bytes), no more data can be written. If writing of new data is attempted, the data is ignored. SCFTDR is initialized to undefined value by a power-on reset.
Bit 7 to 0 Bit Name Initial value R/W Description FIFO for transmits serial data
Undefined W
15.3.5
Serial Mode Register (SCSMR)
SCSMR is a 16-bit register that specifies the SCIF serial communication format and selects the clock source for the baud rate generator. The CPU can always read and write to SCSMR. SCSMR is initialized to H'0000 by a power-on reset.
Bit 15 to 8 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 C/A 0 R/W Communication Mode Selects whether the SCIF operates in asynchronous or synchronous mode. 0: Asynchronous mode 1: Synchronous mode
Rev. 6.00 Jul. 15, 2009 Page 383 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 6
Bit Name CHR
Initial value 0
R/W R/W
Description Character Length Selects 7-bit or 8-bit data in asynchronous mode. In the synchronous mode, the data length is always eight bits, regardless of the CHR setting. 0: 8-bit data 1: 7-bit data* Note: * When 7-bit data is selected, the MSB (bit 7) of the transmit FIFO data register is not transmitted.
5
PE
0
R/W
Parity Enable Selects whether to add a parity bit to transmit data and to check the parity of receive data, in asynchronous mode. In synchronous mode, a parity bit is neither added nor checked, regardless of the PE setting. 0: Parity bit not added or checked 1: Parity bit added and checked* Note: * When PE is set to 1, an even or odd parity bit is added to transmit data, depending on the parity mode (O/E) setting. Receive data parity is checked according to the even/odd (O/E) mode setting.
4
O/E
0
R/W
Parity mode Selects even or odd parity when parity bits are added and checked. The O/E setting is used only in asynchronous mode and only when the parity enable bit (PE) is set to 1 to enable parity addition and checking. The O/E setting is ignored in synchronous mode, or in asynchronous mode when parity addition and checking is disabled. 0: Even parity*1 1: Odd parity*2 Note: 1. If even parity is selected, the parity bit is added to transmit data to make an even number of 1s in the transmitted character and parity bit combined. Receive data is checked to see if it has an even number of 1s in the received character and parity bit combined. 2. If odd parity is selected, the parity bit is added to transmit data to make an odd number of 1s in the transmitted character and parity bit combined. Receive data is checked to see if it has an odd number of 1s in the received character and parity bit combined.
Rev. 6.00 Jul. 15, 2009 Page 384 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 3
Bit Name STOP
Initial value 0
R/W R/W
Description Stop Bit Length Selects one or two bits as the stop bit length in asynchronous mode. This setting is used only in asynchronous mode. It is ignored in synchronous mode because no stop bits are added. When receiving, only the first stop bit is checked, regardless of the STOP bit setting. If the second stop bit is 1, it is treated as a stop bit, but if the second stop bit is 0, it is treated as the start bit of the next incoming character. 0: One stop bit When transmitting, a single 1-bit is added at the end of each transmitted character. 1: Two stop bits When transmitting, two 1 bits are added at the end of each transmitted character.
2
0
R
Reserved This bit is always read as 0. The write value should always be 0.
1 0
CKS1 CKS0
0 0
R/W R/W
Clock Select 1 and 0 Select the internal clock source of the on-chip baud rate generator. Four clock sources are available. P, P/4, P/16 and P/64. For further information on the clock source, bit rate register settings, and baud rate, see section 15.3.8, Bit Rate Register (SCBRR). 00: P 01: P/4 10: P/16 11: P/64 Note: P: Peripheral clock
Rev. 6.00 Jul. 15, 2009 Page 385 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.6
Serial Control Register (SCSCR)
SCSCR is a 16-bit register that operates the SCIF transmitter/receiver, enables/disables interrupt requests, and selects the transmit/receive clock source. The CPU can always read and write to SCSCR. SCSCR is initialized to H'0000 by a power-on reset.
Bit 15 to 8 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 TIE 0 R/W Transmit Interrupt Enable Enables or disables the transmit-FIFO-data-empty interrupt (TXI). Serial transmit data in the transmit FIFO data register (SCFTDR) is send to the transmit shift register (SCTSR). Then, the TDFE flag in the serial status register (SCFSR) is set to1 when the number of data in SCFTDR becomes less than the number of transmission triggers. At this time, a TXI is requested. 0: Transmit-FIFO-data-empty interrupt request (TXI) is disabled* 1: Transmit-FIFO-data-empty interrupt request (TXI) is enabled Note: * The TXI interrupt request can be cleared by writing a greater number of transmit data than the specified transmission trigger number to SCFTDR and by clearing the TDFE bit to 0 after reading 1 from the TDFE bit, or can be cleared by clearing this bit to 0.
Rev. 6.00 Jul. 15, 2009 Page 386 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 6
Bit Name RIE
Initial value 0
R/W R/W
Description Receive Interrupt Enable Enables or disables the receive-data-full (RXI) interrupts requested when the RDF flag or DR flag in serial status register (SCFSR) is set to1, receive-error (ERI) interrupts requested when the ER flag in SCFSR is set to1, and break (BRI) interrupts requested when the BRK flag in SCFSR or the ORER flag in line status register (SCLSR) is set to1. 0: Receive-data-full interrupt (RXI), receive-error interrupt (ERI), and break interrupt (BRI) requests are disabled* 1: Receive-data-full interrupt (RXI), receive-error interrupt (ERI), and break interrupt (BRI) requests are enabled Note: * RXI interrupt requests can be cleared by reading the DR or RDF flag after it has been set to 1, then clearing the flag to 0, or by clearing RIE to 0. ERI or BRI interrupt requests can be cleared by reading the ER, BR or ORER flag after it has been set to 1, then clearing the flag to 0, or by clearing RIE and REIE to 0.
5
TE
0
R/W
Transmit Enable Enables or disables the SCIF serial transmitter. 0: Transmitter disabled 1: Transmitter enabled* Note: * Serial transmission starts after writing of transmit data into SCFTDR. Select the transmit format in SCSMR and SCFCR and reset the transmit FIFO before setting TE to 1.
Rev. 6.00 Jul. 15, 2009 Page 387 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 4
Bit Name RE
Initial value 0
R/W R/W
Description Receive Enable Enables or disables the SCIF serial receiver. 0:Receiver disabled*
1 2
1: Receiver enabled*
Note: 1. Clearing RE to 0 does not affect the receive flags (DR, ER, BRK, RDF, FER, PER, and ORER). These flags retain their previous values. 2. Serial reception starts when a start bit is detected in asynchronous mode, or synchronous clock input is detected in synchronous mode. Select the receive format in SCSMR and SCFCR and reset the receive FIFO before setting RE to 1. 3 REIE 0 R Receive Error Interrupt Enable Enables or disables the receive-error (ERI) interrupts and break (BRI) interrupts. The setting of REIE bit is valid only when RIE bit is set to 0. 0: Receive-error interrupt (ERI) and break interrupt (BRI) requests are disabled* 1: Receive-error interrupt (ERI) and break interrupt (BRI) requests are enabled Note: * ERI or BRI interrupt requests can be cleared by reading the ER, BR or ORER flag after it has been set to 1, then clearing the flag to 0, or by clearing RIE and REIE to 0. Even if RIE is set to 0, when REIE is set to 1, ERI or BRI interrupt requests are enabled. 2 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 388 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 1 0
Bit Name CKE1 CKE0
Initial value 0 0
R/W R/W R/W
Description Clock Enable 1 and 0 Select the SCIF clock source and enable or disable clock output from the SCK pin. Depending on the combination of CKE1 and CKE0, the SCK pin can be used for serial clock output or serial clock input. The CKE0 setting is valid only when the SCIF is operating on the internal clock (CKE1 = 0). The CKE0 setting is ignored when an external clock source is selected (CKE1 = 1). In synchronous mode, select the SCIF operating mode in the serial mode register (SCSMR), then set CKE1 and CKE0. * Asynchronous mode 00: Internal clock, SCK pin used for input pin (The input signal is ignored. The state of the SCK pin depends on both the SCKIO and SCKDT bits.) 01: Internal clock, SCK pin used for clock output (The output clock frequency is 16 times the bit rate.) 10: External clock, SCK pin used for clock input (The input clock frequency is 16 times the bit rate.) 11: Setting prohibited * Synchronous mode 00: Internal clock, SCK pin used for serial clock output 01: Internal clock, SCK pin used for serial clock output 10: External clock, SCK pin used for serial clock input 11: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 389 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.7
Serial Status Register (SCFSR)
SCFSR is a 16-bit register. The upper 8 bits indicate the number of receives errors in the SCFRDR data, and the lower 8 bits indicate the status flag indicating SCIF operating state. The CPU can always read and write to SCFSR, but cannot write 1 to the status flags (ER, TEND, TDFE, BRK, RDF, and DR). These flags can be cleared to 0 only if they have first been read (after being set to 1). Bits 3 (FER) and 2 (PER) are read-only bits that cannot be written. SCFSR is initialized to H'0060 by a power-on reset.
Bit 15 14 13 12 Bit Name PER3 PER2 PER1 PER0 Initial value 0 0 0 0 R/W R R R R Description Number of Parity Errors Indicate the number of data including a parity error in the receive data stored in the receive FIFO data register (SCFRDR). The value indicated by bits 15 to 12 represents the number of parity errors in SCFRDR. When parity errors have occurred in all 16-byte receive data in SCFRDR, PER3 to PER0 show 0. Number of Framing Errors Indicate the number of data including a framing error in the receive data stored in SCFRDR. The value indicated by bits 11 to 8 represents the number of framing errors in SCFRDR. When framing errors have occurred in all 16-byte receive data in SCFRDR, FER3 to FER0 show 0.
11 10 9 8
FER3 FER2 FER1 FER0
0 0 0 0
R R R R
Rev. 6.00 Jul. 15, 2009 Page 390 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 7
Bit Name ER
Initial value 0
R/W
Description
R/(W)* Receive Error Indicates the occurrence of a framing error, or of a 1 parity error when receiving data that includes parity. * 0: Receiving is in progress or has ended normally [Clearing conditions] * * ER is cleared to 0 a power-on reset ER is cleared to 0 when the chip is when 0 is written after 1 is read from ER
1: A framing error or parity error has occurred. [Setting conditions] * ER is set to 1 when the stop bit is 0 after checking whether or not the last stop bit of the received data 2 is 1 at the end of one data receive operation*
*
ER is set to 1 when the total number of 1s in the receive data plus parity bit does not match the even/odd parity specified by the O/E bit in SCSMR Notes: 1. Clearing the RE bit to 0 in SCSCR does not affect the ER bit, which retains its previous value. Even if a receive error occurs, the receive data is transferred to SCFRDR and the receive operation is continued. Whether or not the data read from SCRDR includes a receive error can be detected by the FER and PER bits in SCFSR. 2. In two stop bits mode, only the first stop bit is checked; the second stop bit is not checked.
Rev. 6.00 Jul. 15, 2009 Page 391 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 6
Bit Name TEND
Initial value 0
R/W
Description
R/(W)* Transmit End Indicates that when the last bit of a serial character was transmitted, SCFTDR did not contain valid data, so transmission has ended. 0: Transmission is in progress [Clearing conditions] * TEND is cleared to 0 when 0 is written after 1 is read from TEND after transmit data is written in SCFTDR
1: End of transmission [Setting conditions] * * * TEND is set to 1 when the chip is a power-on reset TEND is set to 1 when TE is cleared to 0 in the serial control register (SCSCR) TEND is set to 1 when SCFTDR does not contain receive data when the last bit of a one-byte serial character is transmitted
Rev. 6.00 Jul. 15, 2009 Page 392 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 5
Bit Name TDFE
Initial value 0
R/W
Description
R/(W)* Transmit FIFO Data Empty Indicates that data has been transferred from the transmit FIFO data register (SCFTDR) to the transmit shift register (SCTSR), the number of data in SCFTDR has become less than the transmission trigger number specified by the TTRG1 and TTRG0 bits in the FIFO control register (SCFCR), and writing of transmit data to SCFTDR is enabled. 0: The number of transmit data written to SCFTDR is greater than the specified transmission trigger number [Clearing conditions] * TDFE is cleared to 0 when data exceeding the specified transmission trigger number is written to SCFTDR after 1 is read from the TDFE bit and then 0 is written TDFE is cleared to 0 when DMAC write data exceeding the specified transmission trigger number to SCFTDR
*
1: The number of transmit data in SCFTDR is equal to or less than the specified transmission trigger number* [Setting conditions] * * TDFE is set to 1 by a power-on reset TDFE is set to 1 when the number of transmit data in SCFTDR has become equal to or less than the specified transmission trigger number as a result of transmission
Note: * Since SCFTDR is a 16-byte FIFO register, the maximum number of data that can be written when TDFE is 1 is "16 minus the specified transmission trigger number". If an attempt is made to write additional data, the data is ignored. The number of data in SCFTDR is indicated by the upper 8 bits of SCFDR.
Rev. 6.00 Jul. 15, 2009 Page 393 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 4
Bit Name BRK
Initial value 0
R/W
Description
R/(W)* Break Detection Indicates that a break signal has been detected in receive data. 0: No break signal received [Clearing conditions] * * BRK is cleared to 0 when the chip is a power-on reset BRK is cleared to 0 when software reads BRK after it has been set to 1, then writes 0 to BRK
1: Break signal received* [Setting condition] * BRK is set to 1 when data including a framing error is received, and a framing error occurs with space 0 in the subsequent receive data
Note: * When a break is detected, transfer of the receive data (H'00) to SCFRDR stops after detection. When the break ends and the receive signal becomes mark 1, the transfer of receive data resumes. 3 FER 0 R Framing Error Indicates a framing error in the data read from the next receive FIFO data register (SCFRDR) in asynchronous mode. 0: No receive framing error occurred in the next data read from SCFRDR [Clearing conditions] * * FER is cleared to 0 when the chip undergoes a power-on reset FER is cleared to 0 when no framing error is present in the next data read from SCFRDR
1: A receive framing error occurred in the next data read from SCFRDR. [Setting condition] * FER is set to 1 when a framing error is present in the next data read from SCFRDR
Rev. 6.00 Jul. 15, 2009 Page 394 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 2
Bit Name PER
Initial value 0
R/W R
Description Parity Error Indicates a parity error in the data read from the next receive FIFO data register (SCFRDR) in asynchronous mode. 0: No receive parity error occurred in the next data read from SCFRDR [Clearing conditions] * * PER is cleared to 0 when the chip undergoes a power-on reset PER is cleared to 0 when no parity error is present in the next data read from SCFRDR
1: A receive parity error occurred in the data read from SCFRDR [Setting condition] * PER is set to 1 when a parity error is present in the next data read from SCFRDR
Rev. 6.00 Jul. 15, 2009 Page 395 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 1
Bit Name RDF
Initial value 0
R/W
Description
R/(W)* Receive FIFO Data Full Indicates that receive data has been transferred to the receive FIFO data register (SCFRDR), and the number of data in SCFRDR has become more than the receive trigger number specified by the RTRG1 and RTRG0 bits in the FIFO control register (SCFCR). 0: The number of transmit data written to SCFRDR is less than the specified receive trigger number [Clearing conditions] * * RDF is cleared to 0 by a power-on reset RDF is cleared to 0 when the SCFRDR is read until the number of receive data in SCFRDR becomes less than the specified receive trigger number after 1 is read from RDF and then 0 is written
1: The number of receive data in SCFRDR is more than the specified receive trigger number [Setting condition] * RDF is set to 1 when a number of receive data more than the specified receive trigger number is stored in SCFRDR*
Note: * SCFTDR is a 16-byte FIFO register. When RDF is 1, the specified receive trigger number of data can be read at the maximum. If an attempt is made to read after all the data in SCFRDR has been read, the data is undefined. The number of receive data in SCFRDR is indicated by the lower 8 bits of SCFDR.
Rev. 6.00 Jul. 15, 2009 Page 396 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 0
Bit Name DR
Initial value 0
R/W
Description
R/(W)* Receive Data Ready Indicates that the number of data in the receive FIFO data register (SCFRDR) is less than the specified receive trigger number, and that the next data has not yet been received after the elapse of 15 ETU from the last stop bit in asynchronous mode. In clock synchronous mode, this bit is not set to 1. 0: Receiving is in progress, or no receive data remains in SCFRDR after receiving ended normally [Clearing conditions] * * DR is cleared to 0 when the chip undergoes a power-on reset DR is cleared to 0 when all receive data are read after 1 is read from DR and then 0 is written
1: Next receive data has not been received [Setting conditions] * DR is set to 1 when SCFRDR contains less data than the specified receive trigger number, and the next data has not yet been received after the elapse of 15 ETU from the last stop bit.*
Note: * This is equivalent to 1.5 frames with the 8-bit, 1-stop-bit format. (ETU: elementary time unit) Note: * The only value that can be written is 0 to clear the flag.
Rev. 6.00 Jul. 15, 2009 Page 397 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.8
Bit Rate Register (SCBRR)
SCBRR is an 8-bit register that, together with the baud rate generator clock source selected by the CKS1 and CKS0 bits in the serial mode register (SCSMR), determines the serial transmit/receive bit rate. The CPU can always read and write to SCBRR. SCBRR is initialized to H'FF by a power-on reset. Each channel has independent baud rate generator control, so different values can be set in three channels. The SCBRR setting is calculated as follows: * Asynchronous mode:
N= P x 106 - 1 64 x 22n-1 x B
* Synchronous mode:
N= P x 106 - 1 8 x 22n-1 x B
B: N:
Bit rate (bits/s) SCBRR setting for baud rate generator (0 N 255) (The setting value should satisfy the electrical characteristics.) P: Operating frequency for peripheral modules (MHz) n: Baud rate generator clock source (n = 0, 1, 2, 3) (for the clock sources and values of n, see table 15.2.)
Rev. 6.00 Jul. 15, 2009 Page 398 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Table 15.2 SCSMR Settings
SCSMR Settings n 0 1 2 3 Clock Source P P/4 P/16 P/64
P x 106 -1 (N + 1) x B x 642n-1 x 2
CKS1 0 0 1 1
CKS0 0 1 0 1
Note: The bit rate error in asynchronous is given by the following formula:
Error (%) = x 100
Table 15.3 lists examples of SCBRR settings in asynchronous mode, and table 15.4 lists examples of SCBRR settings in synchronous mode. Table 15.3 Bit Rates and SCBRR Settings in Asynchronous Mode
P (MHz) 5 Bit Rate (bits/s) n 110 150 300 600 1200 2400 4800 9600 19200 31250 38400 2 2 1 1 0 0 0 0 0 0 0 N 88 64 129 64 129 64 32 15 7 4 3 Error (%) n -0.25 0.16 0.16 0.16 0.16 0.16 -1.36 1.73 1.73 0.00 1.73 2 2 1 1 0 0 0 0 0 0 0 N 106 77 155 77 155 77 38 19 9 5 4 6 Error (%) n -0.44 0.16 0.16 0.16 0.16 0.16 0.16 -2.34 -2.34 0.00 -2.34 2 2 1 1 0 0 0 0 0 0 0 N 108 79 159 79 159 79 39 19 9 5 4 6.144 Error (%) 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2.40 0.00
Rev. 6.00 Jul. 15, 2009 Page 399 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
P (MHz) 7.3728 Bit Rate (bits/s) n 110 150 300 600 1200 2400 4800 9600 19200 31250 38400 2 2 1 1 0 0 0 0 0 0 0 N 130 95 191 95 191 95 47 23 11 6 5 Error (%) n -0.07 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 5.33 0.00 2 2 1 1 0 0 0 0 0 0 0 N 141 103 207 103 207 103 51 25 12 7 6 8 Error (%) n 0.03 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.00 -6.99 2 2 1 1 0 0 0 0 0 0 0 N 174 127 255 127 255 127 63 31 15 9 7 9.8304 Error (%) -0.26 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -1.70 0.00
P (MHz) 10 Bit Rate (bits/s) 110 150 300 600 1200 2400 4800 9600 19200 31250 38400 n 2 2 2 1 1 0 0 0 0 0 0 N 177 129 64 129 64 129 64 32 15 9 7 Error (%) -0.25 0.16 0.16 0.16 0.16 0.16 0.16 -1.36 1.73 0.00 1.73 n 2 2 2 1 1 0 0 0 0 0 0 N 212 155 77 155 77 155 77 38 19 11 9 12 Error (%) 0.03 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.00 -2.34 n 2 2 2 1 1 0 0 0 0 0 0 12.288 N 217 159 79 159 79 159 79 39 19 11 9 Error (%) 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2.40 0.00 n 3 2 2 1 1 0 0 0 0 0 0 14.7456 N 64 191 95 191 95 191 95 47 23 14 11 Error (%) 0.70 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -1.70 0.00
Rev. 6.00 Jul. 15, 2009 Page 400 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
P (MHz) 16 Bit Rate (bits/s) 110 150 300 600 1200 2400 4800 9600 19200 31250 38400 n 3 2 2 1 1 0 0 0 0 0 0 N 70 207 103 207 103 207 103 51 25 15 12 Error (%) 0.03 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.00 0.16 n 3 2 2 1 1 0 0 0 0 0 0 19.6608 N 86 255 127 255 127 255 127 63 31 19 15 Error (%) 0.31 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -1.70 0.00 n 3 3 2 2 1 1 0 0 0 0 0 N 88 64 129 64 129 64 129 64 32 19 15 20 Error (%) -0.25 0.16 0.16 0.16 0.16 0.16 0.16 0.16 -1.36 0.00 1.73 n 3 3 2 2 1 1 0 0 0 0 0 N 106 77 155 77 155 77 155 77 38 23 19 24 Error (%) -0.44 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.16 0.00 -2.34
P (MHz) 24.576 Bit Rate (bits/s) 110 150 300 600 1200 2400 4800 9600 19200 31250 38400 n 3 3 2 2 1 1 0 0 0 0 0 N 108 79 159 79 159 79 159 79 39 24 19 Error (%) 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -1.70 0.00 n 3 3 2 2 1 1 0 0 0 0 0 28.7 N 126 92 186 92 186 92 186 92 46 28 22 Error (%) 0.31 0.46 -0.08 0.46 -0.08 0.46 -0.08 0.46 -0.61 -1.03 1.55 n 3 3 2 2 1 1 0 0 0 0 0 N 132 97 194 97 194 97 194 97 48 29 23 30 Error (%) 0.13 -0.35 0.16 -0.35 0.16 -0.35 -1.36 -0.35 -0.35 0.00 1.73
Note: Settings with an error of 1% or less are recommended.
Rev. 6.00 Jul. 15, 2009 Page 401 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Table 15.4 Bit Rates and SCBRR Settings in Synchronous Mode
P (MHz) Bit Rate (bits/s) 110 250 500 1k 2.5k 5k 10k 25k 50k 100k 250k 500k 1M 2M 5 n 3 3 2 1 0 0 0 0 0 N 77 38 77 124 249 124 49 24 4 n 3 2 2 1 1 0 0 0 0 0 0 0 0 8 N 124 249 124 199 99 199 79 39 19 7 3 1 0* n 3 3 2 2 1 1 0 0 0 0 0 0 0 16 N 249 124 249 99 199 99 159 79 39 15 7 3 1 n 3 3 2 2 1 1 0 0 28.7 N 223 111 178 89 178 71 143 71 n 3 3 2 2 1 1 0 0 0 0 30 N 233 116 187 93 187 74 149 74 29 14
[Legend] Blank: No setting possible : Setting possible, but error occurs *: Continuous transmission/reception is disabled. Note: Settings with an error of 1% or less are recommended.
Rev. 6.00 Jul. 15, 2009 Page 402 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Table 15.5 indicates the maximum bit rates in asynchronous mode when the baud rate generator is used. Tables 15.6 and 15.7 list the maximum rates for external clock input. Table 15.5 Maximum Bit Rates for Various Frequencies with Baud Rate Generator (Asynchronous Mode)
Settings P (MHz) 5 4.9152 8 9.8304 12 14.7456 16 19.6608 20 24 24.576 28.7 30 Maximum Bit Rate (bits/s) 156250 153600 250000 307200 375000 460800 500000 614400 625000 750000 768000 896875 937500 n 0 0 0 0 0 0 0 0 0 0 0 0 0 N 0 0 0 0 0 0 0 0 0 0 0 0 0
Rev. 6.00 Jul. 15, 2009 Page 403 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Table 15.6 Maximum Bit Rates with External Clock Input (Asynchronous Mode)
P (MHz) 5 4.9152 8 9.8304 12 14.7456 16 19.6608 20 24 24.576 28.7 30 External Input Clock (MHz) 1.2500 1.2288 2.0000 2.4576 3.0000 3.6864 4.0000 4.9152 5.0000 6.0000 6.1440 7.1750 7.5000 Maximum Bit Rate (bits/s) 78125 76800 125000 153600 187500 230400 250000 307200 312500 375000 384000 448436 468750
Table 15.7 Maximum Bit Rates with External Clock Input (Synchronous Mode)
P (MHz) 5 8 16 24 28.7 30 External Input Clock (MHz) 0.8333 1.3333 2.6667 4.0000 4.7833 5.0000 Maximum Bit Rate (bits/s) 833333.3 1333333.3 2666666.7 4000000.0 4783333.3 5000000.0
Rev. 6.00 Jul. 15, 2009 Page 404 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.9
FIFO Control Register (SCFCR)
SCFCR is a 16-bit register that resets the number of data in the transmit and receive FIFO registers, sets the trigger data number, and contains an enable bit for loop-back testing. SCFCR can always be read and written to by the CPU. It is initialized to H'0000 by a power-on reset.
Bit 15 to 11 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 10 9 8 RSTRG2 RSTRG1 RSTRG0 0 0 0 R/W R/W R/W RTS Output Active Trigger When the number of receive data in the receive FIFO register (SCFRDR) becomes more than the number shown below, the RTS signal is set to high. These bits are available only in SCFCR_0 and SCFCR_1. In SCFCR_2, these bits are reserved. The initial value is 0 and the write value should always be 0. 000: 15 001: 1 010: 4 011: 6 100: 8 101: 10 110: 12 111: 14
Rev. 6.00 Jul. 15, 2009 Page 405 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 7 6
Bit Name RTRG1 RTRG0
Initial value 0 0
R/W R/W R/W
Description Receive FIFO Data Trigger Set the specified receive trigger number. The receive data full (RDF) flag in the serial status register (SCFSR) is set when the number of receive data stored in the receive FIFO register (SCFRDR) exceeds the specified trigger number shown below. * Asynchronous mode 00: 1 01: 4 10: 8 11: 14 * Synchronous mode 00: 1 01: 2 10: 8 11: 14
5 4
TTRG1 TTRG0
0 0
R/W R/W
Transmit FIFO Data Trigger 1 and 0 Set the specified transmit trigger number. The transmit FIFO data register empty (TDFE) flag in the serial status register (SCFSR) is set when the number of transmit data in the transmit FIFO data register (SCFTDR) becomes less than the specified trigger number shown below. 00: 8 (8)* 01: 4 (12)* 10: 2 (14)* 11: 0 (16)* Note: * Values in parentheses mean the number of remaining bytes in SCFTDR when the TDFE flag is set to 1.
Rev. 6.00 Jul. 15, 2009 Page 406 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 3
Bit Name MCE
Initial value 0
R/W R/W
Description Modem Control Enable Enables modem control signals CTS and RTS. In synchronous mode, clear this bit to 0. This bit is available only in SCFCR_0 and SCFCR_1. In SCFCR_2, this bit is reserved. The initial value is 0 and the write value should always be 0. 0: Modem signal disabled* 1: Modem signal enabled Note: * The CTS pin state has no effect on transmit operations regardless of the input value. The RTS pin state has no effect on receive operations, either.
2
TFRST
0
R/W
Transmit FIFO Data Register Reset Disables the transmit data in the transmit FIFO data register and resets the data to the empty state. 0: Reset operation disabled* 1: Reset operation enabled Note: * Reset operation is executed by a power-on reset.
1
RFRST
0
R/W
Receive FIFO Data Register Reset Disables the receive data in the receive FIFO data register and resets the data to the empty state. 0: Reset operation disabled* 1: Reset operation enabled Note: * Reset operation is executed by a power-on reset.
0
LOOP
0
R/W
Loop-Back Test Internally connects the transmit output pin (TxD) and receive input pin (RxD) and enables loop-back testing. 0: Loop back test disabled 1: Loop back test enabled
Rev. 6.00 Jul. 15, 2009 Page 407 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.10 FIFO Data Count Register (SCFDR) SCFDR is a 16-bit register which indicates the number of data stored in the transmit FIFO data register (SCFTDR) and the receive FIFO data register (SCFRDR). It indicates the number of transmit data in SCFTDR with the upper eight bits, and the number of receive data in SCFRDR with the lower eight bits. SCFDR can always be read from by the CPU. SCFDR is initialized to H'0000 by a power on reset.
Bit 15 to 13 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 12 11 10 9 8 7 to 5 T4 T3 T2 T1 T0 0 0 0 0 0 All 0 R R R R R R Reserved These bits are always read as 0. The write value should always be 0. 4 3 2 1 0 R4 R3 R2 R1 R0 0 0 0 0 0 R R R R R Indicate the number of receive data stored in SCFRDR. H'00 means no receive data, and H'10 means that SCFRDR full of receive data. Indicate the number of non-transmitted data stored in SCFTDR. H'00 means no transmit data, and H'10 means that SCFTDR is full of transmit data.
Rev. 6.00 Jul. 15, 2009 Page 408 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.11 Serial Port Register (SCSPTR) SCSPTR is a 16-bit register that controls input/output and data for the pins multiplexed to the SCIF function. Bits 7 and 6 can control the RTS pin, bits 5 and 4 can control the CTS pin, and bits 3 and 2 can control the SCK pin. Bits 1 and 0 can be used to read the input data from the RxD pin and to output data to the TxD pin, so they control break of serial transfer. In addition to descriptions of individual bits shown below, see section 15.6, Serial Port Register (SCSPTR) and SCIF Pins. SCSPTR can always be read from or written to by the CPU. Bits 7, 5, 3, and 1 in SCSPTR are initialized by a power-on reset.
Bit 15 to 8 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 RTSIO 0 R/W RTS Port Input/Output Control Controls the RTS pin in combination with the RTSDT bit in this register and the MCE bit in SCFCR. This bit is reserved in SCPTR_2 of SCIF channel 2 since SCIF channel 2 does not support the flow control. 6 RTSDT * R/W RTS Port Data Controls the RTS pin in combination with the RTSIO bit in this register and the MCE bit in SCFCR. Select the RTS pin function in the PFC (pin function controller) beforehand. MCE RTSIO RTSDT: RTS pin state 0 0 0 1 0 1 1 x x: 0: 1: x: Input (initial state) Low level output High level output Sequence output according to modem control logic x: Don't care The RTS pin state is read from this bit instead of the set value. This bit is reserved in SCPTR_2 of SCIF channel 2 since SCIF channel 2 does not support the flow control.
Rev. 6.00 Jul. 15, 2009 Page 409 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 5
Bit Name CTSIO
Initial value 0
R/W R/W
Description CTS Port Input/Output Control Controls the CTS pin in combination with the CTSDT bit in this register and the MCE bit in SCFCR. This bit is reserved in SCPTR_2 of SCIF channel 2 since SCIF channel 2 does not support the flow control.
4
CTSDT
*
R/W
CTS Port Data Controls the CTS pin in combination with the CTSIO bit in this register and the MCE bit in SCFCR. Select the CTS pin function in the PFC (pin function controller) beforehand. MCE CTSIO CTSDT: CTS pin state 0 0 0 1 0 1 1 x x: 0: 1: x: Input (initial state) Low level output High level output Input to modem control logic x: Don't care The CTS pin state is read from this bit instead of the set value. This bit is reserved in SCPTR_2 of SCIF channel 2 since SCIF channel 2 does not support the flow control.
3
SCKIO
0
R/W
SCK Port Input/Output Control Controls the SCK pin in combination with the SCKDT bit in this register, the C/A bit in SCSMR, and bits CKE1 and CKE0 in SCSCR.
Rev. 6.00 Jul. 15, 2009 Page 410 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 2
Bit Name SCKDT
Initial value *
R/W R/W
Description SCK Port Data Controls the SCK pin in combination with the SCKIO bit in this register, the C/A bit in SCSMR, and bits CKE1 and CKE0 in SCSCR. Select the SCK pin function in the PFC (pin function controller) beforehand.
C/A 0 0 0 0 CKE1 0 0 0 0 CKE0 0 0 0 1 SCKIO 0 0 1 x SCKDT: x: 0: 1: x: SCK pin state Input (initial state) Low level output High level output Internal clock output according to serial core logic External clock input to serial core logic Setting prohibited Internal clock output according to serial core logic Internal clock output according to serial core logic External clock input to serial core logic Setting prohibited
0 0 1
1 1 0
0 1 0
x x x
x: x: x:
1
0
1
x
x:
1 1
1 1
0 1
x x
x: x:
x: Don't care The SCK pin state is read from this bit instead of the set value. Controls the TxD pin in combination with the SPBDT bit in this register and the TE bit in SCSCR.
1
SPBIO
0
R/W
Serial Port Break Input/Output Control
Rev. 6.00 Jul. 15, 2009 Page 411 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Bit 0
Bit Name SPBDT
Initial value *
R/W R/W
Description Serial Port Break Data Controls the TxD pin in combination with the SPBIO bit in this register and the TE bit in SCSCR. The RxD pin state can also be monitored. Select the TxD or RxD pin function in the PFC (pin function controller) beforehand. TE 0 0 0 0 SPBIO 0 1 1 x SPBDT: x: 0: 1: x: TxD pin state Input (initial state) Low level output High level output Transmit data output according to serial core logic x: Don't care
The RxD pin state is read from this bit instead of the set value. Note: * This bit is read as an undefined value and the setting value is 0.
Rev. 6.00 Jul. 15, 2009 Page 412 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.3.12 Line Status Register (SCLSR) SCLSR is a 16-bit readable/writable register which can always be read from and written to by the CPU. However, a 1 cannot be written to the ORER flag. This flag can be cleared to 0 only if it has first been read (after being set to 1). SCLSR is initialized to H'0000 by a power-on reset.
Bit 15 to 1 Bit Name Initial value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 0 ORER 0 R/(W)* Overrun Error Indicates the occurrence of an overrun error. 0: Receiving is in progress or has ended normally * [Clearing conditions] * * ORER is cleared to 0 when the chip is a power-on reset ORER is cleared to 0 when 0 is written after 1 is read from ORER.
2 1
1: An overrun error has occurred * [Setting condition] *
ORER is set to 1 when the next serial receiving is finished while receive FIFO data are full. Notes: 1. Clearing the RE bit to 0 in SCSCR does not affect the ORER bit, which retains its previous value. 2. The receive FIFO data register (SCFRDR) hold the data before an overrun error is occurred, and the next receive data is extinguished. When ORER is set to 1, SCIF can not continue the next serial receiving. Note: * The only value that can be written is 0 to clear the flag.
Rev. 6.00 Jul. 15, 2009 Page 413 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.4
15.4.1
Operation
Overview
For serial communication, the SCIF has an asynchronous mode in which characters are synchronized individually, and a synchronous mode in which communication is synchronized with clock pulses. The SCIF has a 16-byte FIFO buffer for both transmit and receive operations, reducing the overhead of the CPU, and enabling continuous high-speed communication. Moreover, it has RTS and CTS signals as modem control signals (for channels 0 and 1). The transmission format is selected in the serial mode register (SCSMR), which is shown in table 15.8. The SCIF clock source is selected by the combination of the CKE1 and CKE0 bits in the serial control register (SCSCR), which is shown in table 15.9. Asynchronous Mode: * Data length is selectable: 7 or 8 bits. * Parity bit is selectable. So is the stop bit length (1 or 2 bits). The combination of the preceding selections constitutes the communication format and character length. * In receiving, it is possible to detect framing errors, parity errors, receive FIFO data full, overrun errors, receive data ready, and breaks. * The number of stored data bytes is indicated for both the transmit and receive FIFO registers. * An internal or external clock can be selected as the SCIF clock source. When an internal clock is selected, the SCIF operates using the on-chip baud rate generator. When an external clock is selected, the external clock input must have a frequency 16 times the bit rate. (The on-chip baud rate generator is not used.) Synchronous Mode: * The transmission/reception format has a fixed 8-bit data length. * In receiving, it is possible to detect overrun errors (ORER). * An internal or external clock can be selected as the SCIF clock source. When an internal clock is selected, the SCIF operates using the on-chip baud rate generator, and outputs a serial clock signal to external devices. When an external clock is selected, the SCIF operates on the input serial clock. The onchip baud rate generator is not used.
Rev. 6.00 Jul. 15, 2009 Page 414 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Table 15.8 SCSMR Settings and SCIF Communication Formats
SCSMR Settings Bit 7 C/A 0 Bit 6 CHR 0 Bit 5 PE 0 Bit 3 STOP Mode 0 1 1 0 1 1 0 0 1 1 0 1 1 Note: * * * * Synchronous 8 bits Not set : Don't care Set 7 bits Not set Set Asynchronous SCIF Communication Format Data Length 8 bits Parity Bit Not set Stop Bit Length 1 bit 2 bits 1 bit 2 bits 1 bit 2 bits 1 bit 2 bits None
Table 15.9 SCSMR and SCSCR Settings and SCIF Clock Source Selection
SCSMR Bit 7 C/A 0 SCSCR Settings Bit 1 CKE1 0 Bit 0 CKE0 0 Mode Asynchronous Clock Source Internal SCIF Transmit/Receive Clock SCK Pin Function SCIF does not use the SCK pin. The state of the SCK pin depends on both the SCKIO and SCKDT bits. Clock with a frequency 16 times the bit rate is output. External Synchronous Internal External Input a clock with frequency 16 times the bit rate. Setting prohibited. Serial clock is output. Input the serial clock. Setting prohibited.
1 1 0 1 1 0 1 Note: * * 0 1 : Don't care
Rev. 6.00 Jul. 15, 2009 Page 415 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.4.2
Operation in Asynchronous Mode
In asynchronous mode, each transmitted or received character begins with a start bit and ends with a stop bit. Serial communication is synchronized one character at a time. The transmitting and receiving sections of the SCIF are independent, so full duplex communication is possible. The transmitter and receiver are 16-byte FIFO buffered, so data can be written and read while transmitting and receiving are in progress, enabling continuous transmitting and receiving. Figure 15.2 shows the general format of asynchronous serial communication. In asynchronous serial communication, the communication line is normally held in the mark (high) state. The SCIF monitors the line and starts serial communication when the line goes to the space (low) state, indicating a start bit. One serial character consists of a start bit (low), data (LSB first), parity bit (high or low), and stop bit (high), in that order. When receiving in asynchronous mode, the SCIF synchronizes at the falling edge of the start bit. The SCIF samples each data bit on the eighth pulse of a clock with a frequency 16 times the bit rate. Receive data is latched at the center of each bit.
Idle state (mark state) 1 0/1 Parity bit 1 bit or none 1 1
1 Serial data 0 Start bit 1 bit
LSB D0 D1 D2 D3 D4 D5 D6
MSB D7
Stop bit
Transmit/receive data 7 or 8 bits One unit of transfer data (character or frame)
1 or 2 bits
Figure 15.2 Example of Data Format in Asynchronous Communication (8-Bit Data with Parity and Two Stop Bits)
Rev. 6.00 Jul. 15, 2009 Page 416 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Transmit/Receive Formats: Table 15.10 lists the eight communication formats that can be selected in asynchronous mode. The format is selected by settings in the serial mode register (SCSMR). Table 15.10 Serial Communication Formats (Asynchronous Mode)
SCSMR Bits CHR 0 0 0 0 1 1 1 1 PE STOP 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 START START START START START START START START 2 Serial Transmit/Receive Format and Frame Length 3 4 5 6 7 8 9 10 STOP STOP STOP P P STOP STOP STOP P P STOP STOP STOP STOP STOP STOP 11 12
8-bit data 8-bit data 8-bit data 8-bit data 7-bit data 7-bit data 7-bit data 7-bit data
[Legend] START: Start bit STOP: Stop bit P: Parity bit
Clock: An internal clock generated by the on-chip baud rate generator or an external clock input from the SCK pin can be selected as the SCIF transmit/receive clock. The clock source is selected by the C/A bit in the serial mode register (SCSMR) and bits CKE1 and CKE0 in the serial control register (SCSCR) (table 15.9). When an external clock is input at the SCK pin, it must have a frequency equal to 16 times the desired bit rate. When the SCIF operates on an internal clock, it can output a clock signal at the SCK pin. The frequency of this output clock is equal to 16 times the desired bit rate.
Rev. 6.00 Jul. 15, 2009 Page 417 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Transmitting and Receiving Data: SCIF Initialization (Asynchronous Mode): Before transmitting or receiving, clear the TE and RE bits to 0 in the serial control register (SCSCR), then initialize the SCIF as follows. When changing the operation mode or the communication format, always clear the TE and RE bits to 0 before following the procedure given below. Clearing TE to 0 initializes the transmit shift register (SCTSR). Clearing TE and RE to 0, however, does not initialize the serial status register (SCFSR), transmit FIFO data register (SCFTDR), or receive FIFO data register (SCFRDR), which retain their previous contents. Clear TE to 0 after all transmit data has been transmitted and the TEND flag in the SCFSR is set. The TE bit can be cleared to 0 during transmission, but the transmit data goes to the Mark state after the bit is cleared to 0. Set the TFRST bit in SCFCR to 1 and reset SCFTDR before TE is set again to start transmission. When an external clock is used, the clock should not be stopped during initialization or subsequent operation. SCIF operation becomes unreliable if the clock is stopped.
Rev. 6.00 Jul. 15, 2009 Page 418 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Figure 15.3 shows a sample flowchart for initializing the SCIF.
Start of initialization Clear TE and RE bits in SCSCR to 0 Set TFRST and RFRST bits in SCFCR to 1 After reading BRK, DR, and ER flags in SCFSR, and each flag in SCLSR, write 0 to clear them Set CKE1 and CKE0 bits in SCSCR (leaving TE, RE, TIE, and RIE bits cleared to 0) Set data transfer format in SCSMR Set value in SCBRR Wait 1-bit interval elapsed? Yes Set RTRG1-0 and TTRG1-0 bits in SCFCR, and clear TFRST and RFRST bits to 0 Set TE and RE bits in SCSCR to 1, and set TIE, RIE, and REIE bits End of initialization [4] No [1]
[1] Set the clock selection in SCSCR. Be sure to clear bits TIE, RIE, TE, and RE to 0. [2] Set the data transfer format in SCSMR. [3] Write a value corresponding to the bit rate into SCBRR. (Not necessary if an external clock is used.) [4] Wait at least one bit interval, then set the TE bit or RE bit in SCSCR to 1. Also set the RIE, REIE, and TIE bits. Setting the TE bit enables the TxD and RxD pins to be used. When transmitting, the SCIF will go to the mark state; when receiving, it will go to the idle state, waiting for a start bit.
[2] [3]
Figure 15.3 Sample Flowchart for SCIF Initialization
Rev. 6.00 Jul. 15, 2009 Page 419 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Transmitting Serial Data (Asynchronous Mode) Figure 15.4 shows a sample flowchart for serial transmission. Use the following procedure for serial data transmission after enabling the SCIF for transmission.
Start of transmission [1] SCIF status check and transmit data write: Read SCFSR and check that the TDFE flag is set to 1, then write transmit data to SCFTDR, and read 1 from the TDFE and TEND flags, then clear to 0. [1] The number of transmit data bytes that can be written is 16 - (transmit trigger set number). [2] Serial transmission continuation procedure: No [2] To continue serial transmission, read 1 from the TDFE flag to confirm that writing is possible, then write data to SCFTDR, and then clear the TDFE flag to 0. [3] Break output at the end of serial transmission: No To output a break in serial transmission, clear the SPBDT bit to 0 and set the SPBIO bit to 1 in SCSPTR, then clear the TE bit in SCSCR to 0. In [1] and [2], it is possible to ascertain the number of data bytes that can be written from the number of transmit data bytes in SCFTDR indicated by the upper 8 bits of SCFDR.
Read TDFE flag in SCFSR No
TDFE = 1? Yes Write transmit data in SCFTDR, and read 1 from TDFE flag and TEND flag in SCFSR, then clear to 0
All data transmitted? Yes Read TEND flag in SCFSR
TEND = 1? Yes Break output? Yes Clear SPBDT to 0 and set SPBIO to 1 Clear TE bit in SCSCR to 0
No
[3]
End of transmission
Figure 15.4 Sample Flowchart for Transmitting Serial Data
Rev. 6.00 Jul. 15, 2009 Page 420 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
In serial transmission, the SCIF operates as described below. 1. When data is written into the transmit FIFO data register (SCFTDR), the SCIF transfers the data from SCFTDR to the transmit shift register (SCTSR) and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR) is set to 1 before writing transmit data to SCFTDR. The number of data bytes that can be written is (16 - transmit trigger setting). 2. When data is transferred from SCFTDR to SCTSR and transmission is started, consecutive transmit operations are performed until there is no transmit data left in SCFTDR. When the number of transmit data bytes in SCFTDR falls below the transmit trigger number set in the FIFO control register (SCFCR), the TDFE flag is set. If the TIE bit in the serial control register (SCSR) is set to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated. The serial transmit data is sent from the TxD pin in the following order. A. Start bit: One-bit 0 is output. B. Transmit data: 8-bit or 7-bit data is output in LSB-first order. C. Parity bit: One parity bit (even or odd parity) is output. (A format in which a parity bit is not output can also be selected.) D. Stop bit(s): One or two 1 bits (stop bits) are output. E. Mark state: 1 is output continuously until the start bit that starts the next transmission is sent. 3. The SCIF checks the SCFTDR transmit data at the timing for sending the stop bit. If data is present, the data is transferred from SCFTDR to SCTSR, the stop bit is sent, and then serial transmission of the next frame is started. If there is no transmit data, the TEND flag in SCFSR is set to 1, the stop bit is sent, and then the line goes to the mark state in which 1 is output continuously.
Rev. 6.00 Jul. 15, 2009 Page 421 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Figure 15.5 shows an example of the operation for transmission.
Start bit 0 D0 D1 Data D7 Parity Stop Start bit bit bit 0/1 1 0 D0 D1 Data D7 Parity Stop bit bit 0/1 1
1 Serial data
1 Idle state (mark state)
TDFE
TEND TXI interrupt request Data written to SCFTDR and TDFE flag read as 1 then cleared to 0 by TXI interrupt handler One frame TXI interrupt request
Figure 15.5 Example of Transmit Operation (8-Bit Data, Parity, One Stop Bit) 4. When modem control is enabled, transmission can be stopped and restarted in accordance with the CTS input value. When CTS is set to 1, if transmission is in progress, the line goes to the mark state after transmission of one frame. When CTS is set to 0, the next transmit data is output starting from the start bit. Figure 15.6 shows an example of the operation when modem control is used (only for channel 0).
Start bit Serial data TxD 0 D0 D1
Parity Stop bit bit D7 0/1 1
Start bit 0 D0 D1 D7 0/1
CTS
Drive high before stop bit
Figure 15.6 Example of Operation Using Modem Control (CTS)
Rev. 6.00 Jul. 15, 2009 Page 422 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Receiving Serial Data (Asynchronous Mode): Figures 15.7 and 15.8 show a sample flowchart for serial reception. Use the following procedure for serial data reception after enabling the SCIF for reception.
[1] Receive error handling and break detection: Read the DR, ER, and BRK flags in SCFSR, and the ORER flag in SCLSR, to identify any error, perform the appropriate error handling, then clear the DR, ER, BRK, and ORER flags to 0. In the case of a framing error, a break can also be detected by reading the value of the RxD pin. [2] SCIF status check and receive data read: Read SCFSR and check that RDF = 1, then read the receive data in SCFRDR, read 1 from the RDF flag, and then clear the RDF flag to 0. The transition of the RDF flag from 0 to 1 can also be identified by an RXI interrupt. [3] Serial reception continuation procedure: All data received? Yes Clear RE bit in SCSCR to 0 End of reception [3] To continue serial reception, read at least the receive trigger set number of receive data bytes from SCFRDR, read 1 from the RDF flag, then clear the RDF flag to 0. The number of receive data bytes in SCFRDR can be ascertained by reading from SCRFDR.
Start of reception
Read ER, DR, BRK flags in SCFSR and ORER flag in SCLSR
[1]
ER, DR, BRK or ORER = 1? No Read RDF flag in SCFSR No
Yes
Error handling [2]
RDF = 1? Yes Read receive data in SCFRDR, and clear RDF flag in SCFSR to 0
No
Figure 15.7 Sample Flowchart for Receiving Serial Data (1)
Rev. 6.00 Jul. 15, 2009 Page 423 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Error handling No ORER = 1? Yes Overrun error handling [1] Whether a framing error or parity error has occurred in the receive data that is to be read from SCFRDR can be ascertained from the FER and PER bits in SCFSR. [2] When a break signal is received, receive data is not transferred to SCFRDR while the BRK flag is set. However, note that the last data in SCFRDR is H'00, and the break data in which a framing error occurred is stored.
No ER = 1? Yes Receive error handling
No BRK = 1? Yes Break handling
No DR = 1? Yes Read receive data in SCFRDR
Clear DR, ER, BRK flags in SCFSR, and ORER flag in SCLSR, to 0
End
Figure 15.8 Sample Flowchart for Receiving Serial Data (2)
Rev. 6.00 Jul. 15, 2009 Page 424 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
In serial reception, the SCIF operates as described below. 1. The SCIF monitors the transmission line, and if a 0 start bit is detected, performs internal synchronization and starts reception. 2. The received data is stored in SCRSR in LSB-to-MSB order. 3. The parity bit and stop bit are received. After receiving these bits, the SCIF carries out the following checks. A. Stop bit check: The SCIF checks whether the stop bit is 1. If there are two stop bits, only the first is checked. B. The SCIF checks whether receive data can be transferred from the receive shift register (SCRSR) to SCFRDR. C. Overrun check: The SCIF checks that the ORER flag is 0, indicating that the overrun error has not occurred. D. Break check: The SCIF checks that the BRK flag is 0, indicating that the break state is not set. If all the above checks are passed, the receive data is stored in SCFRDR. Note: When a parity error or a framing error occurs, reception is not suspended. 4. If the RIE bit in SCSCR is set to 1 when the RDF or DR flag changes to 1, a receive-FIFOdata-full interrupt (RXI) request is generated. If the RIE bit or the REIE bit in SCSCR is set to 1 when the ER flag changes to 1, a receive-error interrupt (ERI) request is generated. If the RIE bit or the REIE bit in SCSCR is set to 1 when the BRK or ORER flag changes to 1, a break reception interrupt (BRI) request is generated.
Rev. 6.00 Jul. 15, 2009 Page 425 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Figure 15.9 shows an example of the operation for reception.
Start bit 0 D0 D1 Data D7 Parity Stop Start bit bit bit 0/1 1 0 D0 D1 Data D7 Parity Stop bit bit 0/1 0 0/1
1 Serial data
RDF
FER RXI interrupt request One frame
Data read and RDF flag read as 1 then cleared to 0 by RXI interrupt handler
ERI interrupt request generated by receive error
Figure 15.9 Example of SCIF Receive Operation (8-Bit Data, Parity, One Stop Bit) 5. When modem control is enabled, the RTS signal is output depending on the empty status of SCFRDR. When RTS is 0, reception is possible. When RTS is 1, this indicates that the SCFRDR is full and no extra data can be received. (Only for channel 0 and channel 1) Figure 15.10 shows an example of the operation when modem control is used.
Start bit Serial data RxD 0 D0 D1 D2
Parity Stop bit bit D7 0/1 1
Start bit 0 D0 D1 D7 0/1
RTS
Figure 15.10 Example of Operation Using Modem Control (RTS)
Rev. 6.00 Jul. 15, 2009 Page 426 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.4.3
Synchronous Mode
In synchronous mode, the SCIF transmits and receives data in synchronization with clock pulses. This mode is suitable for high-speed serial communication. The SCIF transmitter and receiver are independent, so full-duplex communication is possible while sharing the same clock. The transmitter and receiver are also 16-byte FIFO buffered, so continuous transmitting or receiving is possible by reading or writing data while transmitting or receiving is in progress. Figure 15.11 shows the general format in synchronous serial communication.
One unit of transfer data (character or frame) * Synchronization clock LSB Serial data Don't care Note: * High except in continuous transfer Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 MSB Bit 7 Don't care *
Figure 15.11 Data Format in Synchronous Communication In synchronous serial communication, each data bit is output on the communication line from one falling edge of the serial clock to the next. Data is guaranteed valid at the rising edge of the serial clock. In each character, the serial data bits are transmitted in order from the LSB (first) to the MSB (last). After output of the MSB, the communication line remains in the state of the MSB. In synchronous mode, the SCIF transmits data by synchronizing with the falling edge of the serial clock, and receives data by synchronizing with the rising edge of the serial clock.
Rev. 6.00 Jul. 15, 2009 Page 427 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Communication Format: The data length is fixed at eight bits. No parity bit can be added. Clock: An internal clock generated by the on-chip baud rate generator or an external clock input from the SCK pin can be selected as the SCIF transmit/receive clock. When the SCIF operates on an internal clock, it outputs the clock signal at the SCK pin. Eight clock pulses are output per transmitted or received character. When the SCIF is not transmitting or receiving, the clock signal remains in the high state. When only receiving, the clock signal outputs while the RE bit of SCSCR is 1 and the number of data in receive FIFO is less than the receive FIFO data trigger number. In this case, 8 x (16 + 1) = 136 pulses of synchronous clock are output. To perform reception of n characters of data, select an external clock as the clock source. If an internal clock should be used, set RE = 1 and TE = 1 and receive n characters of data simultaneously with the transmission of n characters of dummy data. Transmitting and Receiving Data SCIF Initialization (Synchronous Mode): Before transmitting, receiving, or changing the mode or communication format, the software must clear the TE and RE bits to 0 in the serial control register (SCSCR), then initialize the SCIF. Clearing TE to 0 initializes the transmit shift register (SCTSR). Clearing RE to 0, however, does not initialize the RDF, PER, FER, and ORER flags and receive data register (SCRDR), which retain their previous contents. Figure 15.12 shows a sample flowchart for initializing the SCIF.
Rev. 6.00 Jul. 15, 2009 Page 428 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Start of initialization
Clear TE and RE bits in SCSCR to 0 Set TFRST and RFRST bits in SCFCR to 1 to clear the FIFO buffer After reading BRK, DR, and ER flags in SCFSR and a flag in SCLSR, write 0 to clear them Set CKE1 and CKE0 bits in SCSCR (leaving TE, RE, TIE, and RIE bits cleared to 0) Set data transfer format in SCSMR Set value in SCBRR Wait 1-bit interval elapsed? Yes Set RTRG1-0 and TTRG1-0 bits in SCFCR, and clear TFRST and RFRST bits to 0 Set TE and RE bits in SCSCR to 1, and set TIE, RIE, and REIE bits End of initialization
[1]
[1] Leave the TE and RE bits cleared to 0 until the initialization almost ends. Be sure to clear the TIE, RIE, TE, and RE bits to 0. [2] Set the CKE1 and CKE0 bits. [3] Set the data transfer format in SCSMR. [4] Write a value corresponding to the bit rate into SCBRR. This is not necessary if an external clock is used. Wait at least one bit interval after this write before moving to the next step.
[2]
[3] [4]
No
[5] Set the TE or RE bit in SCSCR to 1. Also set the TEI, RIE, and REIE bits to enable the TxD, RxD, and SCK pins to be used. When transmitting, the TxD pin will go to the mark state. When receiving in clocked synchronous mode with the synchronization clock output (clock master) selected, a clock starts to be output from the SCIF_CLK pin at this point.
[5]
Figure 15.12 Sample Flowchart for SCIF Initialization
Rev. 6.00 Jul. 15, 2009 Page 429 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Transmitting Serial Data (Synchronous Mode): Figure 15.13 shows a sample flowchart for transmitting serial data.
Start of transmission [1] SCIF status check and transmit data write: No Read SCFSR and check that the TDFE flag is set to 1, then write transmit data to SCFTDR. Read the TDFE and TEND flags while they are 1, then clear them to 0. [1]
Read TDFE flag in SCFSR
TDFE = 1? Yes Write transmit data to SCFTDR Read TDFE and TEND flags in SCFSR while they are 1, then clear them to 0
[2] Serial transmission continuation procedeure: To continue serial transmission, read 1 from the TDFE flag to confirm that writing is possible, them write data to SCFTDR, and then clear the TDFE flag to 0.
All data transmitted? [2] Yes Read TEND flag in SCFSR
No
TEND = 1? Yes Clear TE bit in SCSCR to 0
No
End of transmission
Figure 15.13 Sample Flowchart for Transmitting Serial Data
Rev. 6.00 Jul. 15, 2009 Page 430 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
In transmitting serial data, the SCIF operates as follows: 1. When data is written into the transmit FIFO data register (SCFTDR), the SCIF transfers the data from SCFTDR to the transmit shift register (SCTSR) and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR) is set to 1 before writing transmit data to SCFTDR. The number of data bytes that can be written is (16 - transmit trigger setting). 2. When data is transferred from SCFTDR to SCTSR and transmission is started, consecutive transmit operations are performed until there is no transmit data left in SCFTDR. When the number of transmit data bytes in SCFTDR falls below the transmit trigger number set in the FIFO control register (SCFCR), the TDFE flag is set. If the TIE bit in the serial control register (SCSR) is set to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated. If clock output mode is selected, the SCIF outputs eight synchronous clock pulses. If an external clock source is selected, the SCIF outputs data in synchronization with the input clock. Data is output from the TxD pin in order from the LSB (bit 0) to the MSB (bit 7). 3. The SCIF checks the SCFTDR transmit data at the timing for sending the MSB (bit 7). If data is present, the data is transferred from SCFTDR to SCTSR, the MSB (bit 7) is sent, and then serial transmission of the next frame is started. If there is no transmit data, the TEND flag in SCFSR is set to 1, the MSB (bit 7) is sent, and then the TxD pin holds the states. 4. After the end of serial transmission, the SCK pin is held in the high state. Figure 15.14 shows an example of SCIF transmit operation.
Synchronization clock Serial data LSB Bit 0 Bit 1 MSB Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
TDFE
TEND
TXI interrupt request Data written to SCFTDR TXI and TDFE flag cleared interrupt to 0 by TXI interrupt request handler
One frame
Figure 15.14 Example of SCIF Transmit Operation
Rev. 6.00 Jul. 15, 2009 Page 431 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Receiving Serial Data (Synchronous Mode): Figure 15.15 and 15.16 show a sample flowchart for receiving serial data. When switching from asynchronous mode to synchronous mode without SCIF initialization, make sure that ORER, PER, and FER are cleared to 0.
[1] Receive error handling: Read the ORER flag in SCLSR to identify any error, perform the appropriate error handling, then clear the ORER flag to 0. Transmission/reception cannot be resumed while the ORER flag is set to 1. Yes [1] No Read RDF flag in SCFSR No Error handling [2] [2] SCIF status check and receive data read: Read SCFSR and check that RDF = 1, then read the receive data in SCFRDR, and clear the RDF flag to 0. The transition of the RDF flag from 0 to 1 can also be identified by an RXI interrupt. [3] Serial reception continuation procedure: RDF = 1? Yes Read receive data in SCFRDR, and clear RDF flag in SCFSR to 0 No All data received? Yes Clear RE bit in SCSCR to 0 End of reception [3] To continue serial reception, read at least the receive trigger set number of receive data bytes from SCFRDR, read 1 from the RDF flag, then clear the RDF flag to 0. The number of receive data bytes in SCFRDR can be ascertained by reading SCFRDR.
Start of reception Read ORER flag in SCLSR
ORER = 1?
Figure 15.15 Sample Flowchart for Receiving Serial Data (1)
Error handling No
ORER = 1? Yes Overrun error handling
Clear ORER flag in SCLSR to 0
End
Figure 15.16 Sample Flowchart for Receiving Serial Data (2)
Rev. 6.00 Jul. 15, 2009 Page 432 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
In receiving, the SCIF operates as follows: 1. The SCIF synchronizes with serial clock input or output and initializes internally. 2. Receive data is shifted into SCRSR in order from the LSB to the MSB. After receiving the data, the SCIF checks the receive data can be loaded from SCRSR into SCFRDR or not. If this check is passed, the SCIF stores the received data in SCFRDR. If the check is not passed (overrun error is detected), further reception is prevented. 3. After setting RDF to 1, if the receive-data-full interrupt enable bit (RIE) is set to 1 in SCSCR, the SCIF requests a receive-data-full interrupt (RXI). If the ORER bit is set to 1 and the RIE bit or REIE bit in SCSCR is also set to 1, the SCIF requests a break interrupt (BRI). Figure 15.17 shows an example of SCIF receive operation.
Synchronization clock Serial data Bit 7 LSB Bit 0 MSB Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
RDF
ORER
Data read from RXI RXI SCFRDR and interrupt interrupt request RDF flag cleared request to 0 by RXI interrupt handler BRI interrupt request by overrun error
One frame
Figure 15.17 Example of SCIF Receive Operation
Rev. 6.00 Jul. 15, 2009 Page 433 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Transmitting and Receiving Serial Data Simultaneously (Synchronous Mode): Figure 15.18 shows a sample flowchart for transmitting and receiving serial data simultaneously.
Initialization
[1] SCIF status check and transmit data write: Read SCFSR and check that the TDFE flag is set to 1, then write transmit data to SCFTDR. Read the TDFE and TEND flags while they are 1, then clear them to 0. The transition of the TDFE flag from 0 to 1 can also be identified by a TXI interrupt. [2] Receive error handling: Read the ORER flag in SCLSR to identify any error, perform the appropriate error handling, then clear the ORER flag to 0. Reception cannot be resumed while the ORER flag is set to 1. [3] SCIF status check and receive data read:
Start of transmission and reception
Read TDFE flag in SCFSR
No
TDFE = 1? Yes Write transmit data to SCFTDR Read TDFE and TEND flags in SCFSR while they are 1, then clear them to 0
[1]
Read ORER flag in SCLSR Yes [2] No Read RDF flag in SCFSR Error handling
ORER = 1?
Read SCFSR and check that RDF = 1, then read the receive data in SCFRDR, and clear the RDF flag to 0. The transition of the RDF flag from 0 to 1 can also be identified by an RXI interrupt. [4] Serial transmission and reception continuation procedure: To continue serial transmission and reception, read 1 from the RDF flag and the receive data in SCFRDR, and clear the RDF flag to 0 before receiving the MSB in the current frame. Similarly, read 1 from the TDFE flag to confirm that writing is possible before transmitting the MSB in the current frame. Then write data to SCFTDR and clear the TDFE flag to 0.
No
RDF = 1? Yes Read receive data in SCFRDR, and clear RDF flag in SCFSR to 0
[3]
No
All data received? Yes Clear TE and RE bits in SCSCR to 0 [4] Note: When switching from a transmit operation or receive operation to simultaneous transmission and reception operations, clear the TE and RE bits to 0, and then set them simultaneously to 1.
End of transmission and reception
Figure 15.18 Sample Flowchart for Transmitting/Receiving Serial Data
Rev. 6.00 Jul. 15, 2009 Page 434 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.5
SCIF Interrupts
The SCIF has four interrupt sources: transmit-FIFO-data-empty (TXI), receive-error (ERI), receive-data-full (RXI), and break (BRI). Table 15.11 shows the interrupt sources and their order of priority. The interrupt sources are enabled or disabled by means of the TIE, RIE, and REIE bits in SCSCR. A separate interrupt request is sent to the interrupt controller for each of these interrupt sources. When TXI request is enabled by TIE bit and the TDFE flag in the serial status register (SCFSR) is set to 1, a TXI interrupt request is generated. When RXI request is enabled by RIE bit and the RDF or DR flag in SCFSR is set to 1, an RXI interrupt request is generated. The RXI interrupt request caused by DR flag is generated only in asynchronous mode. When BRI request is enabled by RIE bit or REIE bit and the BRK flag in SCFSR or ORER flag in SCLSR is set to 1, a BRI interrupt request is generated. When ERI request is enabled by RIE bit or REIE bit and the ER flag in SCFCR is set to 1, an ERI interrupt request is generated. When the RIE bit is set to 0 and the REIE bit is set to 1, SCIF request ERI interrupt and BRI interrupt without requesting RXI interrupt. The TXI interrupt indicates that transmit data can be written, and the RXI interrupt indicates that there is receive data in SCFRDR. Table 15.11 SCIF Interrupt Sources
Interrupt Source ERI RXI BRI TXI Description Interrupt initiated by receive error (ER) Interrupt Enable Bit RIE or REIE Priority on Reset Release High
Interrupt initiated by receive data FIFO full (RDF) or RIE data ready (DR) Interrupt initiated by break (BRK) or overrun error (ORER) Interrupt initiated by transmit FIFO data empty (TDFE) RIE or REIE TIE Low
Rev. 6.00 Jul. 15, 2009 Page 435 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.6
Serial Port Register (SCSPTR) and SCIF Pins
The relationship between SCSPTR and the SCIF pins is shown in figures 15.19 to 15.23.
Reset R Q D RTSIO C Bit 7
Internal data bus
SPTRW Reset RTS R Q D RTSDT C SPTRW Modem control enable signal* RTS signal Bit 6
SPTRR SPTRW: SPTRR: Note: SCSPTR write SCSPTR read
* The modem control function is specified for the RTS pin by setting the MCE bit in SCFCR.
Figure 15.19 RTSIO Bit, RTSDT Bit, and RTS Pin
Rev. 6.00 Jul. 15, 2009 Page 436 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Reset R Q D CTSIO C SPTRW Reset R Q D CTSDT C SPTRW Bit 4 Bit 5
Internal data bus
CTS
Modem control enable signal* CTS signal
SPTRR SPTRW: SPTRR: Note: SCSPTR write SCSPTR read
* The modem control function is specified for the CTS pin by setting the MCE bit in SCFCR.
Figure 15.20 CTSIO Bit, CTSDT Bit, and CTS Pin
Rev. 6.00 Jul. 15, 2009 Page 437 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Reset R Q D SCKIO C SPTRW Reset SCK2 R Q D SCKDT C SPTRW Clock output enable signal* Sirial clock output signal* Serial clock input signal* Serial input enable signal* Bit 2 Internal data bus Bit 3
SPTRR SPTRW: SPTRR: Note: SCSPTR write SCSPTR read
* These signals control the SCK pin according to the settings of the C/A bit in SCSMR and bits CKE1 and CKE0 in SCSCR.
Figure 15.21 SCKIO Bit, SCKDT Bit, and SCK Pin
Reset R Q D SPBIO C SPTRW Reset TxD R Q D SPBDT C SPTRW Transmit enable signal Serial transmit data Bit 0 Bit 1
Internal data bus
SPTRW:
SCSPTR write
Figure 15.22 SPBIO Bit, SPBDT Bit, and TxD Pin
Rev. 6.00 Jul. 15, 2009 Page 438 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
RxD Serial receive data
Internal data bus
Bit 0 SPTRR SPTRR: SCSPTR read
Figure 15.23 SPBDT Bit and RxD Pin
Rev. 6.00 Jul. 15, 2009 Page 439 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
15.7
Usage Notes
Note the following when using the SCIF. 1. SCFTDR Writing and TDFE Flag The TDFE flag in the serial status register (SCFSR) is set when the number of transmit data bytes written in the transmit FIFO data register (SCFTDR) has fallen below the transmit trigger number set by bits TTRG1 and TTRG0 in the FIFO control register (SCFCR). After TDFE is set, transmit data up to the number of empty bytes in SCFTDR can be written, allowing efficient continuous transmission. However, if the number of data bytes written in SCFTDR is equal to or less than the transmit trigger number, the TDFE flag will be set to 1 again after being read as 1 and cleared to 0. TDFE clearing should therefore be carried out when SCFTDR contains more than the transmit trigger number of transmit data bytes. The number of transmit data bytes in SCFTDR can be found from the upper 8 bits of the FIFO data count register (SCFDR). 2. SCFRDR Reading and RDF Flag The RDF flag in the serial status register (SCFSR) is set when the number of receive data bytes in the receive FIFO data register (SCFRDR) has become equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0 in the FIFO control register (SCFCR). After RDF is set, receive data equivalent to the trigger number can be read from SCFRDR, allowing efficient continuous reception. However, if the number of data bytes in SCFRDR is equal to or greater than the trigger number, the RDF flag will be set to 1 again if it is cleared to 0. RDF should therefore be cleared to 0 after being read as 1 after all the receive data has been read. The number of receive data bytes in SCFRDR can be found from the lower 8 bits of the FIFO data count register (SCFDR). 3. Break Detection and Processing Break signals can be detected by reading the RxD pin directly when a framing error (FER) is detected. In the break state the input from the RxD pin consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that, although transfer of receive data to SCFRDR is halted in the break state, the SCIF receiver continues to operate.
Rev. 6.00 Jul. 15, 2009 Page 440 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
4. Sending a Break Signal The I/O condition and level of the TxD pin are determined by the SPBIO and SPBDT bits in the serial port register (SCSPTR). This feature can be used to send a break signal. Until TE bit is set to 1 (enabling transmission) after initializing, TxD pin does not work. During the period, mark status is performed by SPBDT bit. Therefore, the SPBIO and SPBDT bits should be set to 1 (high level output). To send a break signal during serial transmission, clear the SPBDT bit to 0 (designating low level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the transmitter is initialized regardless of the current transmission state, and 0 is output from the TxD pin. 5. Receive Data Sampling Timing and Receive Margin (Asynchronous Mode) The SCIF operates on a base clock with a frequency of 16 times the transfer rate. In reception, the SCIF synchronizes internally with the fall of the start bit, which it samples on the base clock. Receive data is latched at the rising edge of the eighth base clock pulse. The timing is shown in figure 15.24.
16 clocks 8 clocks
0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5
Base clock -7.5 clocks +7.5 clocks
Receive data (RxD) Synchronization sampling timing Data sampling timing
Start bit
D0
D1
Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode
Rev. 6.00 Jul. 15, 2009 Page 441 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
The receive margin in asynchronous mode can therefore be expressed as shown in equation 1. Equation 1:
M = (0.5 D - 0.5 1 ) = (L - 0.5) F (1+F) x 100 % 2N N
Where: M: Receive margin (%) N: Ratio of clock frequency to bit rate (N = 16) D: Clock duty cycle (D = 0 to 1.0) L: Frame length (L = 9 to 12) F: Absolute deviation of clock frequency From equation 1, if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation 2. Equation 2: When D = 0.5 and F = 0: M = (0.5 - 1/(2 x 16)) x 100% = 46.875% This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%. 6. Prohibited Multiple Pin Allocation for Channel 1 Although signals SCK1, RxD1, and TxD1 can be respectively assigned to multiple pins of PD4 or PE20, PD3 or PE19, and PD2 or PE18, either of them must be selected. For example, if signal SCK1 is assigned to both pins PD4 and PE20, correct operation of the SCIF is not guaranteed. 7. Status of the TxD and RTS Pins When the TE Bit is Cleared The TxDi (i = 0, 1, 2) and RTSj (j = 0, 1) pins usually function as output pins during serial communication. However, even if these functions are selected by the pin function controller (PFC), the internal weak keeper drives the pins to unstable levels as long as the TE bit in SCSCRi (i = 0, 1, 2) is cleared. To make these pins always function as output pins (regardless of the value of the TE bit), set SCSPTRi (i = 0, 1, 2) and PFC in the following order. a. Set the SPBIO and SPBDT bits in SCSPTRi (i = 0, 1, 2). Set the RTSIO and RTSDT bits in SCSPTRj (j = 0, 1). b. Select the TxDi (i = 0, 1, 2) and RTSj (j = 0, 1) pins with the PFC. 8. Interval from when the TE bit in SCSCR is Set to 1 until a Start Bit is Transmitted in Asynchronous Mode In the SCIF included in former products, a start bit is transmitted after the internal equivalent to one frame. In the SCIF included in this product, however, a start bit is transmitted directly after the TE bit is set to 1.
Rev. 6.00 Jul. 15, 2009 Page 442 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
9. Clear Timing of the FER or PER Bits when the DMAC Saves the Receive Data in Asynchronous Mode The FER or PER bits in SCFSR are set when data including a framing error or parity error is received in asynchronous mode, whereas cleared when the corresponding data is read from SCFRDR. Therefore, when data with an error is received while the DMAC is set to save the receive data automatically, the receive-error interrupt is accepted after the DMAC reads the corresponding data. As a result, the CPU cannot check the FER or PER bits. To prevent this defect, the RTRG[1:0] bits in SCFCR should be set to the higher number to delay the DMAC call timing. This enables the CPU to check the FER or PER bits in the receive-error interrupt routine, prior to the DMAC to read the error data.
Rev. 6.00 Jul. 15, 2009 Page 443 of 816 REJ09B0237-0600
Section 15 Serial Communication Interface with FIFO (SCIF)
Rev. 6.00 Jul. 15, 2009 Page 444 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Section 16 Serial I/O with FIFO (SIOF)
This LSI includes a clock-synchronized serial I/O module with FIFO (SIOF) that comprises one channel. The SIOF can perform serial communication with a serial peripheral interface bus (SPI).
16.1
Features
* Serial transfer 16-stage 32-bit FIFOs (independent transmission and reception) Supports 8-bit data/16-bit data/16-bit stereo audio input and output MSB first for data transmission Supports a maximum of 48-kHz sampling rate Synchronization by either frame synchronization pulse or left/right channel switch Supports CODEC control data interface Connectable to linear, audio, or A-Law or -Law CODEC chip Supports both master and slave modes * Serial clock An external pin input or internal clock (P) can be selected as the clock source. * Interrupts: One type * DMA transfer Supports DMA transmission and reception by a transfer request for transmission and reception * SPI mode Fixed master mode can perform the full-duplex communication with the SPI slave devices continuously. Selects the falling/rising edge of the SCK as data sampling. Selects the clock phase of the SCK as a transmit timing. Selects one slave device. The length of transmit/receive data is fixed to 8 bits.
Rev. 6.00 Jul. 15, 2009 Page 445 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Figure 16.1 shows a block diagram of the SIOF.
SIOF interrupt request Bus interface
Peripheral bus
Control registers
Transmit FIFO (32 bits x16 stages)
Receive FIFO (32 bits x16 stages)
P
Transmit control data
Receive control data
Baud rate generator
1/nMCLK
Timing control P/S S/P
SIOFMCLK
SIOFSCK SIOFSYNC
SIOFTxD
SIOFRxD
Figure 16.1 Block Diagram of SIOF
Rev. 6.00 Jul. 15, 2009 Page 446 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.2
Input/Output Pins
The pin configuration in this module is shown in table 16.1. Table 16.1 Pin Configuration
Channel 0 Pin Name SIOF0_MCLK SIOF0_SCK (SCK0) SIOF0_SYNC (SS00) Abbreviation* SIOFMCLK SIOFSCK (SCK) I/O Input I/O Function Master clock input Serial clock (common to transmission/reception) In SPI mode, fixed to output. SIOFSYNC (SS0) I/O Frame synchronous signal (common to transmission/reception) In SPI mode, fixed to output, and selects slave device 0. SIOF0_TxD (MOSI0) SIOF0_RxD (MISO0) Note: * SIOFTxD (MOSI) Output SIOFRxD (MISO) Input Transmit data Receive data
The pins are abbreviated as SIOFMCLK, SIOFSCK, SIOFSYNC, SIOFTxD, and SIOFRxD in the following descriptions. In SPI mode, the pins are called SCK, SS0, MOSI, and MISO.
Rev. 6.00 Jul. 15, 2009 Page 447 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3
Register Descriptions
The SIOF has the following registers. For the addresses of these registers and the register states in each operating state, refer to section 24, List of Registers. In the register descriptions following this section, channel numbers are omitted. Channel 0: * * * * * * * * * * * * * * Mode register_0 (SIMDR_0) Control register_0 (SICTR_0) Transmit data register_0 (SITDR_0) Receive data register_0 (SIRDR_0) Transmit control data register_0 (SITCR_0) Receive control data register_0 (SIRCR_0) Status register_0 (SISTR_0) Interrupt enable register_0 (SIIER_0) FIFO control register_0 (SIFCTR_0) Clock select register_0 (SISCR_0) Transmit data assign register_0 (SITDAR_0) Receive data assign register_0 (SIRDAR_0) Control data assign register_0 (SICDAR_0) SPI control register_0 (SPICR_0)
Rev. 6.00 Jul. 15, 2009 Page 448 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.1
Mode Register (SIMDR)
SIMDR is a 16-bit readable/writable register that sets the SIOF operating mode.
Bit 15 14 Bit Name TRMD1 TRMD0 Initial Value 1 0 R/W R/W R/W Description Transfer Mode 1, 0 Select transfer mode. For details, see table 16.2. 00: Slave mode 1 01: Slave mode 2 10: Master mode 1 11: Master mode 2 13 SYNCAT 0 R/W SIOFSYNC Pin Valid Timing Indicates the position of the SIOFSYNC signal to be output as a synchronization pulse. 0: At the start-bit data of frame 1: At the last-bit data of slot 12 REDG 0 R/W Receive Data Sampling Edge 0: The SIOFRxD signal is sampled at the falling edge of SIOFSCK (The SIOFTxD signal is transmitted at the rising edge of SIOFSCK.) 1: The SIOFRxD signal is sampled at the rising edge of SIOFSCK (The SIOFTxD signal is transmitted at the falling edge of SIOFSCK.) Note: This bit is valid only in master mode.
Rev. 6.00 Jul. 15, 2009 Page 449 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 11 10 9 8
Bit Name FL3 FL2 FL1 FL0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Frame Length 3 to 0 00xx: Data length is 8 bits and frame length is 8 bits. 0100: Data length is 8 bits and frame length is 16 bits. 0101: Data length is 8 bits and frame length is 32 bits. 0110: Data length is 8 bits and frame length is 64 bits. 0111: Data length is 8 bits and frame length is 128 bits. 10xx: Data length is 16 bits and frame length is 16 bits. 1100: Data length is 16 bits and frame length is 32 bits. 1101: Data length is 16 bits and frame length is 64 bits. 1110: Data length is 16 bits and frame length is 128 bits. 1111: Data length is 16 bits and frame length is 256 bits. Note: When data length is specified as 8 bits, control data cannot be transmitted or received. x: Don't care
7
TXDIZ
0
R/W
SIOFTxD Pin Output when Transmission is Invalid* 0: High output (1 output) when invalid 1: High-impedance state when invalid Note: Invalid means when disabled, and when a slot that is not assigned as transmit data or control data is being transmitted.
6
RCIM
0
R/W
Receive Control Data Interrupt Mode 0: Sets the RCRDY bit in SISTR when the contents of SIRCR change. 1: Sets the RCRDY bit in SISTR each time when the SIRCR receives the control data.
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 450 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 4
Bit Name SYNCDL
Initial Value 0
R/W R/W
Description Data Pin Bit Delay for SIOFSYNC Pin Valid when the SIOFSYNC signal is output as synchronous pulse. Only one-bit delay is valid for transmission in slave mode. 0: No bit delay 1: 1-bit delay
3 to 0
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
Table 16.2 Operation in Each Transfer Mode
Transfer Mode Slave mode 1 Slave mode 2 Master mode 1 Master mode 2 Note: * Master/Slave Slave Slave Master Master SIOFSYNC Synchronous pulse Synchronous pulse Synchronous pulse L/R No Bit Delay SYNCDL bit Control Data Method* Slot position Secondary FS Slot position Not supported
The control data method is valid only when the FL3 to FL0 bits are specified as 1xxx. (x: Don't care.)
Rev. 6.00 Jul. 15, 2009 Page 451 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.2
Control Register (SICTR)
SICTR is a 16-bit readable/writable register that sets the SIOF operating state.
Bit 15 Bit Name SCKE Initial Value 0 R/W R/W Description Serial Clock Output Enable This bit is valid in master mode. 0: Disables the SIOFSCK output (outputs 0) 1: Enables the SIOFSCK output * If this bit is set to 1, the SIOF initializes the baud rate generator and initiates the operation. At the same time, the SIOF outputs the clock generated by the baud rate generator to the SIOFSCK pin.
This bit is initialized in module stop mode. 14 FSE 0 R/W Frame Synchronous Signal Output Enable This bit is valid in master mode. 0: Disables the SIOFSYNC output (outputs 0) 1: Enables the SIOFSYNC output * If this bit is set to 1, the SIOF initializes the frame counter and initiates the operation.
This bit is initialized in module stop mode. 13 to 10 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 452 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 9
Bit Name TXE
Initial Value 0
R/W R/W
Description Transmit Enable 0: Disables data transmission from the SIOFTxD pin 1: Enables data transmission from the SIOFTxD pin * * This bit setting becomes valid at the start of the next frame (at the rising edge of the SIOFSYNC signal). When the 1 setting for this bit becomes valid, the SIOF issues a transmit transfer request according to the setting of the TFWM bit in SIFCTR. When transmit data is stored in the transmit FIFO, transmission of data from the SIOFTxD pin begins. This bit is initialized upon a transmit reset.
* 8 RXE 0 R/W
This bit is initialized in module stop mode. Receive Enable 0: Disables data reception from SIOFRxD 1: Enables data reception from SIOFRxD * * This bit setting becomes valid at the start of the next frame (at the rising edge of the SIOFSYNC signal). When the 1 setting for this bit becomes valid, the SIOF begins the reception of data from the SIOFRxD pin. When receive data is stored in the receive FIFO, the SIOF issues a reception transfer request according to the setting of the RFWM bit in SIFCTR. This bit is initialized upon receive reset.
* 7 to 2 All 0 R
This bit is initialized in module stop mode. Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 453 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 1
Bit Name TXRST
Initial Value 0
R/W R/W
Description Transmit Reset 0: Does not reset transmit operation 1: Resets transmit operation * This bit setting becomes valid immediately. This bit should be cleared to 0 before setting the register to be initialized. When the 1 setting for this bit becomes valid, the SIOF immediately sets transmit data from the SIOFTxD pin to 1, and initializes the transmit data register and transmit-related status. The following are initialized. SITDR SITCR Transmit FIFO write pointer and read pointer TCRDY, TFEMP, and TDREQ bits in SISTR TXE bit
*
0
RXRST
0
R/W
Receive Reset 0: Does not reset receive operation 1: Resets receive operation * This bit setting becomes valid immediately. This bit should be cleared to 0 before setting the register to be initialized. When the 1 setting for this bit becomes valid, the SIOF immediately disables reception from the SIOFRxD pin, and initializes the receive data register and receive-related status. The following are initialized. SIRDR SIRCR Receive FIFO write pointer and read pointer RCRDY, RFFUL, and RDREQ bits in SISTR RXE bit
*
Rev. 6.00 Jul. 15, 2009 Page 454 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.3
Transmit Data Register (SITDR)
SITDR is a 32-bit write-only register that specifies the SIOF transmit data. SITDR is initialized by the conditions specified in section 24, List of Registers, or by a transmit reset caused by the TXRST bit in SICTR. SITDR is initialized in module stop mode.
Bit 31 to 16 Bit Name SITDL 15 to 0 Initial Value All 0 R/W W Description Left-Channel Transmit Data Specify data to be output from the SIOFTxD pin as leftchannel data. The position of the left-channel data in the transmit frame is specified by the TDLA bit in SITDAR. * 15 to 0 SITDR 15 to 0 All 0 W These bits are valid only when the TDLE bit in SITDAR is set to 1.
Right-Channel Transmit Data Specify data to be output from the SIOFTxD pin as right-channel data. The position of the right-channel data in the transmit frame is specified by the TDRA bit in SITDAR. * These bits are valid only when the TDRE bit and TLREP bit in SITDAR are set to 1 and cleared to 0, respectively.
Rev. 6.00 Jul. 15, 2009 Page 455 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.4
Receive Data Register (SIRDR)
SIRDR is a 32-bit read-only register that reads receive data of the SIOF. SIRDR stores data in the receive FIFO and is initialized to undefined value by the conditions specified in section 24, List of Registers, or by a receive reset caused by the RXRST bit in SICTR.
Bit 31 to 16 Bit Name SIRDL 15 to 0 Initial Value R/W Description Left-Channel Receive Data Store data received from the SIOFRxD pin as leftchannel data. The position of the left-channel data in the receive frame is specified by the RDLA bit in SIRDAR. * 15 to 0 SIRDR 15 to 0 Undefined R These bits are valid only when the RDLE bit in SIRDAR is set to 1.
Undefined R
Right-Channel Receive Data Store data received from the SIOFRxD pin as rightchannel data. The position of the right-channel data in the receive frame is specified by the RDRA bit in SIRDAR. * These bits are valid only when the RDRE bit in SIRDAR is set to 1.
Rev. 6.00 Jul. 15, 2009 Page 456 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.5
Transmit Control Data Register (SITCR)
SITCR is a 32-bit readable/writable register that specifies transmit control data of the SIOF. SITCR can be specified only when the FL3 to FL0 bits in SIMDR are specified as 1xxx (x: Don't care.). SITCR is initialized in module stop mode.
Bit 31 to 16 Bit Name SITC0 15 to 0 Initial Value All 0 R/W R/W Description Control Channel 0 Transmit Data Specify data to be output from the SIOFTxD pin as control channel 0 transmit data. The position of the control channel 0 data in the transmit or receive frame is specified by the CD0A bit in SICDAR. * 15 to 0 SITC1 15 to 0 All 0 R/W These bits are valid only when the CD0E bit in SICDAR is set to 1.
Control Channel 1 Transmit Data Specify data to be output from the SIOFTxD pin as control channel 1 transmit data. The position of the control channel 1 data in the transmit or receive frame is specified by the CD1A bit in SICDAR. * These bits are valid only when the CD1E bit in SICDAR is set to 1.
Rev. 6.00 Jul. 15, 2009 Page 457 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.6
Receive Control Data Register (SIRCR)
SIRCR is a 32-bit readable/writable register that stores receive control data of the SIOF. SIRCR can be specified only when the FL3 to FL0 bits in SIMDR are specified as 1xxx (x: Don't care.).
Bit 31 to 16 Bit Name SIRC0 15 to 0 Initial Value All 0 R/W R Description Control Channel 0 Receive Data Store data received from the SIOFRxD pin as control channel 0 receive data. The position of the control channel 0 data in the transmit or receive frame is specified by the CD0A bit in SICDAR. * 15 to 0 SIRC1 15 to 0 All 0 R These bits are valid only when the CD0E bit in SICDAR is set to 1.
Control Channel 1 Receive Data Store data received from the SIOFRxD pin as control channel 1 receive data. The position of the control channel 1 data in the transmit or receive frame is specified by the CD1A bit in SICDAR. * These bits are valid only when the CD1E bit in SICDAR is set to 1.
Rev. 6.00 Jul. 15, 2009 Page 458 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.7
Status Register (SISTR)
SISTR is a 16-bit read-only register that shows the SIOF state. Each bit in this register becomes an SIOF interrupt source when the corresponding bit in SIIER is set to 1. SISTR is initialized in module stop mode.
Bit 15 Bit Name Initial Value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 14 TCRDY 0 R Transmit Control Data Ready 0: Indicates that a write to SITCR is disabled 1: Indicates that a write to SITCR is enabled * If SITCR is written when this bit is cleared to 0, SITCR is over-written and the previous contents of SITCR are not output from the SIOFTxD pin. This bit is valid when the TXE bit in SITCR is set to 1. This bit indicates a state of the SIOF. If SITCR is written, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
* * * 13 TFEMP 0 R
Transmit FIFO Empty 0: Indicates that transmit FIFO is not empty 1: Indicates that transmit FIFO is empty * * * This bit is valid when the TXE bit in SICTR is 1. This bit indicates a state; if SITDR is written, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 459 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 12
Bit Name TDREQ
Initial Value 0
R/W R
Description Transmit Data Transfer Request 0: Indicates that the size of empty space in the transmit FIFO does not exceed the size specified by the TFWM bit in SIFCTR. 1: Indicates that the size of empty space in the transmit FIFO exceeds the size specified by the TFWM bit in SIFCTR. A transmit data transfer request is issued when the empty space in the transmit FIFO exceeds the size specified by the TFWM bit in SIFCTR. When using transmit data transfer through the DMAC, this bit is always cleared by one DMAC access. After DMAC access, when conditions for setting this bit are satisfied, the SIOF again indicates 1 for this bit. * * This bit is valid when the TXE bit in SICTR is 1. This bit indicates a state; if the size of empty space in the transmit FIFO is less than the size specified by the TFWM bit in SIFCTR, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
* 11 0 R
Reserved This bit is always read as 0. The write value should always be 0.
10
RCRDY
0
R
Receive Control Data Ready 0: Indicates that the SIRCR stores no valid data. 1: Indicates that the SIRCR stores valid data. * * * * If SIRCR is written when this bit is set to 1, SIRCR is modified by the latest data. This bit is valid when the RXE bit in SICTR is set to 1. This bit indicates a state of the SIOF. If SIRCR is read, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 460 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 9
Bit Name RFFUL
Initial Value 0
R/W R
Description Receive FIFO Full 0: Receive FIFO not full 1: Receive FIFO full * * * This bit is valid when the RXE bit in SICTR is 1. This bit indicates a state; if SIRDR is read, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
8
RDREQ
0
R
Receive Data Transfer Request 0: Indicates that the size of valid space in the receive FIFO does not exceed the size specified by the RFWM bit in SIFCTR. 1: Indicates that the size of valid space in the receive FIFO exceeds the size specified by the RFWM bit in SIFCTR. A receive data transfer request is issued when the valid space in the receive FIFO exceeds the size specified by the RFWM bit in SIFCTR. When using receive data transfer through the DMAC, this bit is always cleared by one DMAC access. After DMAC access, when conditions for setting this bit are satisfied, the SIOF again indicates 1 for this bit. * * This bit is valid when the RXE bit in SICTR is 1. This bit indicates a state; if the size of valid space in the receive FIFO is less than the size specified by the RFWM bit in SIFCTR, the SIOF clears this bit. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
* 7, 6 All 0 R
Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 461 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 5
Bit Name SAERR
Initial Value 0
R/W R/W
Description Slot Assign Error 0: Indicates that no slot assign error occurs 1: Indicates that a slot assign error occurs A slot assign error occurs when the specifications in SITDAR, SIRDAR, and SICDAR overlap. If a slot assign error occurs, the SIOF does not transmit data to the SIOFTxD pin and does not receive data from the SIOFRxD pin. Note that the SIOF does not clear the TXE bit or RXE bit in SICTR at a slot assign error. * * * This bit is valid when the TXE bit or RXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
4
FSERR
0
R/W
Frame Synchronization Error 0: Indicates that no frame synchronization error occurs 1: Indicates that a frame synchronization error occurs A frame synchronization error occurs when the next frame synchronization timing appears before the previous data or control data transfers have been completed. If a frame synchronization error occurs, the SIOF performs transmission or reception for slots that can be transferred. * * * This bit is valid when the TXE or RXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 462 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 3
Bit Name TFOVF
Initial Value 0
R/W R/W
Description Transmit FIFO Overflow 0: No transmit FIFO overflow 1: Transmit FIFO overflow A transmit FIFO overflow means that there has been an attempt to write to SITDR when the transmit FIFO is full. When a transmit FIFO overflow occurs, the SIOF indicates overflow, and writing is invalid. * * * This bit is valid when the TXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
2
TFUDF
0
R/W
Transmit FIFO Underflow 0: No transmit FIFO underflow 1: Transmit FIFO underflow A transmit FIFO underflow means that loading for transmission has occurred when the transmit FIFO is empty. When a transmit FIFO underflow occurs, the SIOF repeatedly sends the previous transmit data. * * * This bit is valid when the TXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 463 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 1
Bit Name RFUDF
Initial Value 0
R/W R/W
Description Receive FIFO Underflow 0: No receive FIFO underflow 1: Receive FIFO underflow A receive FIFO underflow means that reading of SIRDR has occurred when the receive FIFO is empty. When a receive FIFO underflow occurs, the value of data read from SIRDR is not guaranteed. * * * This bit is valid when the RXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
0
RFOVF
0
R/W
Receive FIFO Overflow 0: No receive FIFO overflow 1: Receive FIFO overflow A receive FIFO overflow means that writing has occurred when the receive FIFO is full. When a receive FIFO overflow occurs, the SIOF indicates overflow, and receive data is lost. * * When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid. If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 464 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.8
Interrupt Enable Register (SIIER)
SIIER is a 16-bit readable/writable register that enables the issue of SIOF interrupts. When each bit in this register is set to 1 and the corresponding bit in SISTR is set to 1, the SIOF issues an interrupt.
Bit 15 Bit Name TDMAE Initial Value 0 R/W R/W Description Transmit Data DMA Transfer Request Enable Transmits an interrupt as an interrupt to the CPU/DMA transfer request. The TDREQE bit can be set as transmit interrupts. 0: Used as a CPU interrupt 1: Used as a DMA transfer request to the DMAC 14 TCRDYE 0 R/W Transmit Control Data Ready Enable 0: Disables interrupts due to transmit control data ready 1: Enables interrupts due to transmit control data ready 13 TFEMPE 0 R/W Transmit FIFO Empty Enable 0: Disables interrupts due to transmit FIFO empty 1: Enables interrupts due to transmit FIFO empty 12 TDREQE 0 R/W Transmit Data Transfer Request Enable 0: Disables interrupts due to transmit data transfer requests 1: Enables interrupts due to transmit data transfer requests 11 RDMAE 0 R/W Receive Data DMA Transfer Request Enable Transmits an interrupt as an interrupt to the CPU/DMA transfer request. The RDREQE bit can be set as receive interrupts. 0: Used as a CPU interrupt 1: Used as a DMA transfer request to the DMAC 10 RCRDYE 0 R/W Receive Control Data Ready Enable 0: Disables interrupts due to receive control data ready 1: Enables interrupts due to receive control data ready
Rev. 6.00 Jul. 15, 2009 Page 465 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 9
Bit Name RFFULE
Initial Value 0
R/W R/W
Description Receive FIFO Full Enable 0: Disables interrupts due to receive FIFO full 1: Enables interrupts due to receive FIFO full
8
RDREQE
0
R/W
Receive Data Transfer Request Enable 0: Disables interrupts due to receive data transfer requests 1: Enables interrupts due to receive data transfer requests
7, 6
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
5
SAERRE
0
R/W
Slot Assign Error Enable 0: Disables interrupts due to slot assign error 1: Enables interrupts due to slot assign error
4
FSERRE
0
R/W
Frame Synchronization Error Enable 0: Disables interrupts due to frame synchronization error 1: Enables interrupts due to frame synchronization error
3
TFOVFE
0
R/W
Transmit FIFO Overflow Enable 0: Disables interrupts due to transmit FIFO overflow 1: Enables interrupts due to transmit FIFO overflow
2
TFUDFE
0
R/W
Transmit FIFO Underflow Enable 0: Disables interrupts due to transmit FIFO underflow 1: Enables interrupts due to transmit FIFO underflow
1
RFUDFE
0
R/W
Receive FIFO Underflow Enable 0: Disables interrupts due to receive FIFO underflow 1: Enables interrupts due to receive FIFO underflow
0
RFOVFE
0
R/W
Receive FIFO Overflow Enable 0: Disables interrupts due to receive FIFO overflow 1: Enables interrupts due to receive FIFO overflow
Rev. 6.00 Jul. 15, 2009 Page 466 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.9
FIFO Control Register (SIFCTR)
SIFCTR is a 16-bit readable/writable register that indicates the area available for the transmit/receive FIFO transfer.
Bit 15 14 13 Bit Name TFWM2 TFWM1 TFWM0 Initial Value 0 0 0 R/W R/W R/W R/W Description Transmit FIFO Watermark 000: Issue a transfer request when 16 stages of the transmit FIFO are empty. 001: Setting prohibited 010: Setting prohibited 011: Setting prohibited 100: Issue a transfer request when 12 or more stages of the transmit FIFO are empty. 101: Issue a transfer request when 8 or more stages of the transmit FIFO are empty. 110: Issue a transfer request when 4 or more stages of the transmit FIFO are empty. 111: Issue a transfer request when 1 or more stages of transmit FIFO are empty. * * 12 11 10 9 8 TFUA4 TFUA3 TFUA2 TFUA1 TFUA0 1 0 0 0 0 R R R R R A transfer request to the transmit FIFO is issued by the TDREQE bit in SISTR. The transmit FIFO is always used as 16 stages of the FIFO regardless of these bit settings.
Transmit FIFO Usable Area Indicate the number of words that can be transferred by the CPU or DMAC as B'00000 (full) to B'10000 (empty).
Rev. 6.00 Jul. 15, 2009 Page 467 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 7 6 5
Bit Name RFWM2 RFWM1 RFWM0
Initial Value 0 0 0
R/W R/W R/W R/W
Description Receive FIFO Watermark 000: Issue a transfer request when 1 stage or more of the receive FIFO are valid. 001: Setting prohibited 010: Setting prohibited 011: Setting prohibited 100: Issue a transfer request when 4 or more stages of the receive FIFO are valid. 101: Issue a transfer request when 8 or more stages of the receive FIFO are valid. 110: Issue a transfer request when 12 or more stages of the receive FIFO are valid. 111: Issue a transfer request when 16 stages of the receive FIFO are valid. * * A transfer request to the receive FIFO is issued by the RDREQE bit in SISTR. The receive FIFO is always used as 16 stages of the FIFO regardless of these bit settings.
4 3 2 1 0
RFUA4 RFUA3 RFUA2 RFUA1 RFUA0
0 0 0 0 0
R R R R R
Receive FIFO Usable Area Indicate the number of words that can be transferred by the CPU or DMAC as B'00000 (empty) to B'10000 (full).
Rev. 6.00 Jul. 15, 2009 Page 468 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.10 Clock Select Register (SISCR) SISCR is a 16-bit readable/writable register that sets the serial clock generation conditions for the master clock. SISCR can be specified when the TRMD1 and TRMD0 bits in SIMDR are specified as B'10 or B'11.
Bit 15 Bit Name MSSEL Initial Value 1 R/W R/W Description Master Clock Source Selection 0: Uses the input signal of the SIOFMCLK pin as the master clock 1: Uses P as the master clock The master clock is the clock input to the baud rate generator. 14 MSIMM 1 R/W Master Clock Direct Selection 0: Uses the output clock of the baud rate generator as the serial clock 1: Uses the master clock itself as the serial clock 13 0 R Reserved This bit is always read as 0. The write value should always be 0. 12 11 10 9 8 7 to 3 BRPS4 BRPS3 BRPS2 BRPS1 BRPS0 0 0 0 0 0 All 0 R/W R/W R/W R/W R/W R Prescalar Setting Set the master clock division ratio according to the count value of the prescalar of the baud rate generator. The range of settings is from B'00000 (x 1/1) to B'11111 (x 1/32). Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 469 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 2 1 0
Bit Name BRDV2 BRDV1 BRDV0
Initial Value 0 0 0
R/W R/W R/W R/W
Description Baud rate generator's Division Ratio Setting Set the frequency division ratio for the output stage of the baud rate generator. 000: Prescalar output x 1/2 001: Prescalar output x 1/4 010: Prescalar output x 1/8 011: Prescalar output x 1/16 100: Prescalar output x 1/32 101: Setting prohibited 110: Setting prohibited 111: Prescalar output x 1/1* The final frequency division ratio of the baud rate generator is determined by BRPS x BRDV (maximum 1/1024). Note: * This setting is valid only when the BRPS4 to BRPS0 bits are set to B'00000.
16.3.11 Transmit Data Assign Register (SITDAR) SITDAR is a 16-bit readable/writable register that specifies the position of the transmit data in a frame (slot number).
Bit 15 Bit Name TDLE Initial Value 0 R/W R/W Description Transmit Left-Channel Data Enable 0: Disables left-channel data transmission 1: Enables left-channel data transmission 14 to 12 All 0 R Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 470 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 11 10 9 8
Bit Name TDLA3 TDLA2 TDLA1 TDLA0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Transmit Left-Channel Data Assigns 3 to 0 Specify the position of left-channel data in a transmit frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * Transmit data for the left channel is specified in the SITDL bit in SITDR.
7
TDRE
0
R/W
Transmit Right-Channel Data Enable 0: Disables right-channel data transmission 1: Enables right-channel data transmission
6
TLREP
0
R/W
Transmit Left-Channel Repeat 0: Transmits data specified in the SITDR bit in SITDR as right-channel data 1: Repeatedly transmits data specified in the SITDL bit in SITDR as right-channel data * * This bit setting is valid when the TDRE bit is set to 1. When this bit is set to 1, the SITDR settings are ignored.
5, 4
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
3 2 1 0
TDRA3 TDRA2 TDRA1 TDRA0
0 0 0 0
R/W R/W R/W R/W
Transmit Right-Channel Data Assigns 3 to 0 Specify the position of right-channel data in a transmit frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * Transmit data for the right channel is specified in the SITDR bit in SITDR.
Rev. 6.00 Jul. 15, 2009 Page 471 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.12 Receive Data Assign Register (SIRDAR) SIRDAR is a 16-bit readable/writable register that specifies the position of the receive data in a frame (slot number).
Bit 15 Bit Name RDLE Initial Value 0 R/W R/W Description Receive Left-Channel Data Enable 0: Disables left-channel data reception 1: Enables left-channel data reception 14 to 12 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 11 10 9 8 RDLA3 RDLA2 RDLA1 RDLA0 0 0 0 0 R/W R/W R/W R/W Receive Left-Channel Data Assigns 3 to 0 Specify the position of left-channel data in a receive frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * 7 RDRE 0 R/W Receive data for the left channel is stored in the SIRDL bit in SIRDR.
Receive Right-Channel Data Enable 0: Disables right-channel data reception 1: Enables right-channel data reception
6 to 4
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
3 2 1 0
RDRA3 RDRA2 RDRA1 RDRA0
0 0 0 0
R/W R/W R/W R/W
Receive Right-Channel Data Assigns 3 to 0 Specify the position of right-channel data in a receive frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * Receive data for the right channel is stored in the SIRDR bit in SIRDR.
Rev. 6.00 Jul. 15, 2009 Page 472 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.3.13 Control Data Assign Register (SICDAR) SICDAR is a 16-bit readable/writable register that specifies the position of the control data in a frame (slot number). SICDAR can be specified only when the FL bit in SIMDR is specified as 1xxx (x: Don't care.).
Bit 15 Bit Name CD0E Initial Value 0 R/W R/W Description Control Channel 0 Data Enable 0: Disables transmission and reception of control channel 0 data 1: Enables transmission and reception of control channel 0 data 14 to 12 All 0 R Reserved These bits are always read as 0. The write value should always be 0. 11 10 9 8 CD0A3 CD0A2 CD0A1 CD0A0 0 0 0 0 R/W R/W R/W R/W Control Channel 0 Data Assigns 3 to 0 Specify the position of control channel 0 data in a receive or transmit frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * * 7 CD1E 0 R/W Transmit data for the control channel 0 data is specified in the SITD0 bit in SITCR. Receive data for the control channel 0 data is stored in the SIRD0 bit in SIRCR.
Control Channel 1 Data Enable 0: Disables transmission and reception of control channel 1 data 1: Enables transmission and reception of control channel 1 data
6 to 4
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 473 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 3 2 1 0
Bit Name CD1A3 CD1A2 CD1A1 CD1A0
Initial Value 0 0 0 0
R/W R/W R/W R/W R/W
Description Control Channel 1 Data Assigns 3 to 0 Specify the position of control channel 1 data in a receive or transmit frame as B'0000 (0) to B'1110 (14). 1111: Setting prohibited * * Transmit data for the control channel 1 data is specified in the SITD1 bit in SITCR. Receive data for the control channel 1 data is stored in the SIRD1 bit in SIRCR.
16.3.14 SPI Control Register (SPICR) SPICR is a 16-bit readable/writable register that specifies the operating mode of the SPI.
Bit 15 Bit Name SPIM Initial Value 0 R/W R/W Description SPI Mode Selects the SIOF operating mode. 0: Operates as the SIOF. 1: The SIOF operates in master mode of the SPI. 14 0 R Reserved This bit is always read as 0. The write value should always be 0. 13 CPHA 0 R/W SPI Clock Phase Selects the SPI clock phase. 0: Samples data at the first edge of the SCK. 1: Samples data at the second edge of the SCK. 12 CPOL 0 R/W SPI Clock Polarity Selects the SPI clock polarity. 0: The SCK is high-active, and goes low in the idle state. 1: The SCK is low-active, and goes high in the idle state.
Rev. 6.00 Jul. 15, 2009 Page 474 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit
Bit Name
Initial Value All 0
R/W R
Description Reserved These bits are always read as 0. The write value should always be 0.
11 to 9
8
SS0E
0
R/W
Slave Device 0 (SS0) Enable 0: Not select slave device 0. 1: Selects slave device 0.
7, 6
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
5 4
SSAST1 SSAST0
0 0
R/W R/W
Setting of SS Assert Set the setup timing of the SS for the SCK. * CPHA = 0 SSAST[1:0] 00 01 10 11 * CPHA = 1 SSAST[1:0] 00 01 10 11 SS Setup 0 clock 0.5 clock 1 clock 1.5 clock SS Hold 0.5 clock 1 clock 1.5 clock 2 clock SS Setup 0.5 clock 1 clock 1.5 clock 2 clock SS Hold 0 clock 0.5 clock 1 clock 1.5 clock (Unit: SCK clock)
(Unit: SCK clock)
3, 2
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 475 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Bit 1 0
Bit Name FLD1 FLD0
Initial Value 0 0
R/W R/W R/W
Description Frame Delay Specify the minimum time of the idle state between frames in terms of the clock number of the SCK. 00: Not delay. The continuous communication of the SPI is performed when the SS pin asserts low continuously. 01: Delay for 1 clock of the SCK. 10: Delay for 2 clocks of the SCK. 11: Delay for 3 clocks of the SCK.
Rev. 6.00 Jul. 15, 2009 Page 476 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4
16.4.1
Operation
Serial Clocks
Master/Slave Modes: The following two modes are available as the SIOF clock mode. * Slave mode: SIOFSCK, SIOFSYNC input * Master mode: SIOFSCK, SIOFSYNC output Baud Rate Generator: In SIOF master mode, the baud rate generator (BRG) is used to generate the serial clock. The division ratio is from 1/1 to 1/1024. Figure 16.2 shows connections for supply of the serial clock.
MCLK
BRG
1/1 to 1/1024 MCLK
SIOFMCLK P
Timing control
SCKE Master SIOFSCK
Figure 16.2 Serial Clock Supply Table 16.3 shows an example of serial clock frequency. Table 16.3 SIOF Serial Clock Frequency
Sampling Rate Frame Length 32 bits 64 bits 128 bits 256 bits 8 kHz 256 kHz 512 kHz 1.024 MHz 2.048 MHz 44.1 kHz 1.4112 MHz 2.8224 MHz 5.6448 MHz 11.289 MHz 48 kHz 1.536 MHz 3.072 MHz 6.144 MHz 12.289 MHz
Rev. 6.00 Jul. 15, 2009 Page 477 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.2
Serial Timing
SIOFSYNC: The SIOFSYNC is a frame synchronous signal. Depending on the transfer mode, it has the following functions. * Synchronous pulse: 1-bit-width pulse indicating the start of the frame * L/R: 1/2-frame-width pulse indicating the left-channel stereo data (L) in high level and the right-channel stereo data (R) in low level Figure 16.3 shows the SIOFSYNC synchronization timing.
(a) Synchronous pulse 1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD Start bit data 1-bit delay (b) L/R 1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD Start bit of left channel data (1/2 frame length) No delay Start bit of right channel data (1/2 frame length)
Figure 16.3 Serial Data Synchronization Timing
Rev. 6.00 Jul. 15, 2009 Page 478 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Transmit/Receive Timing: The SIOFTxD transmit timing and SIOFRxD receive timing relative to the SIOFSCK can be set as the sampling timing in the following ways. The transmit/receive timing is set using the REDG bit in SIMDR. * Falling-edge sampling * Rising-edge sampling Figure 16.4 shows the transmit/receive timing.
(a) Falling-edge sampling SIOFSCK SIOFSYNC SIOFTxD SIOFRxD Receive timing Transmit timing (a) Rising-edge sampling SIOFSCK SIOFSYNC SIOFTxD SIOFRxD Receive timing Transmit timing
Figure 16.4 SIOF Transmit/Receive Timing 16.4.3 Transfer Data Format
The SIOF performs the following transfer. * Transmit/receive data: Transfer of 8-bit data/16-bit data/16-bit stereo data * Control data: Transfer of 16-bit data (uses the specific register as interface) Transfer Mode: The SIOF supports the following four transfer modes as listed in table 16.4. The transfer mode can be specified by the TRMD1 and TRMD0 bits in SIMDR. Table 16.4 Serial Transfer Modes
Transfer Mode Slave mode 1 Slave mode 2 Master mode 1 Master mode 2 SIOFSYNC Synchronous pulse Synchronous pulse Synchronous pulse L/R No Bit Delay SYNCDL bit Control Data Slot position Secondary FS Slot position Not supported
Rev. 6.00 Jul. 15, 2009 Page 479 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Frame Length: The length of the frame to be transferred by the SIOF is specified by the FL3 to FL0 bits in SIMDR. Table 16.5 shows the relationship between the FL3 to FL0 bit settings and frame length. Table 16.5 Frame Length
FL3 to FL0 00xx 0100 0101 0110 0111 10xx 1100 1101 1110 1111 Slot Length 8 8 8 8 8 16 16 16 16 16 Number of Bits in a Frame 8 16 32 64 128 16 32 64 128 256 Transfer Data 8-bit monaural data 8-bit monaural data 8-bit monaural data 8-bit monaural data 8-bit monaural data 16-bit monaural data 16-bit monaural/stereo data 16-bit monaural/stereo data 16-bit monaural/stereo data 16-bit monaural/stereo data
Note: x: Don't care.
Slot Position: The SIOF can specify the position of transmit data, receive data, and control data in a frame (common to transmission and reception) by slot numbers. The slot number of each data is specified by the following registers. * Transmit data: SITDAR * Receive data: SIRDAR * Control data: SICDAR Only 16-bit data is valid for control data. In addition, control data is always assigned to the same slot number both in transmission and reception.
Rev. 6.00 Jul. 15, 2009 Page 480 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.4
Register Allocation of Transfer Data
Transmit/Receive Data: Writing and reading of transmit/receive data is performed for the following registers. * Transmit data writing: SITDR (32-bit access) * Receive data reading: SIRDR (32-bit access) Figure 16.5 shows the transmit/receive data and the SITDR and SIRDR bit alignment.
(a) 16-bit stereo data 31 24 23 L-channel data 16 15 87 R-channel data 0
(b) 16-bit monaural data 31 24 23 Data
16 15
87
0
(c) 8-bit monaural data 31 24 23 Data
16 15
87
0
(d) 16-bit stereo data (left and right same audio output) data 31 24 23 16 15 87 Data
0
Figure 16.5 Transmit/Receive Data Bit Alignment Note: In the figure, only the shaded areas are transmitted or received as valid data. Data in unshaded areas is not transmitted or received. Monaural or stereo can be specified for transmit data by the TDLE bit and TDRE bit in SITDAR. Monaural or stereo can be specified for receive data by the RDLE bit and RDRE bit in SIRDAR. To achieve left and right same audio output while stereo is specified for transmit data, specify the TLREP bit in SITDAR. Tables 16.6 and 16.7 show the audio mode specification for transmit data and that for receive data, respectively.
Rev. 6.00 Jul. 15, 2009 Page 481 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Table 16.6 Audio Mode Specification for Transmit Data
Bit Mode Monaural Stereo Left and right same audio output Note: x: Don't care TDLE 1 1 1 TDRE 0 1 1 TLREP x 0 1
Table 16.7 Audio Mode Specification for Receive Data
Bit Mode Monaural Stereo RDLE 1 1 RDRE 0 1
Note: Left and right same audio mode is not supported in receive data. To execute monaural transmission or reception, use the left channel.
Control Data: Control data is written to or read from by the following registers. * Transmit control data write: SITCR (32-bit access) * Receive control data read: SIRCR (32-bit access) Figure 16.6 shows the control data and bit alignment in SITCR and SIRCR.
(a) Control data: One channel 31 24 23 Control data (channel 0) 16 15 87 0
(b) Control data: Two channels 31 24 23 Control data (channel 0)
16 15
87 Control data (channel 1)
0
Figure 16.6 Control Data Bit Alignment
Rev. 6.00 Jul. 15, 2009 Page 482 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
The number of channels in control data is specified by the CD0E and CD1E bits in SICDAR. Table 16.8 shows the relationship between the number of channels in control data and bit settings. Table 16.8 Setting Number of Channels in Control Data
Bit Number of Channels 1 2 CD0E 1 1 CD1E 0 1
Note: To use only one channel in control data, use channel 0.
16.4.5
Control Data Interface
Control data performs control command output to the CODEC and status input from the CODEC. The SIOF supports the following two control data interface methods. * Control by slot position * Control by secondary FS Control data is valid only when data length is specified as 16 bits. Control by Slot Position (Master Mode 1, Slave Mode 1): Control data is transferred for all frames transmitted or received by the SIOF by specifying the slot position of control data. This method can be used in both SIOF master and slave modes. Figure 16.7 shows an example of the control data interface timing by slot position control.
1 frame
SIOFSCK SIOFSYNC SIOFTxD SIOFRxD
L-channel data Control channel 0 R-channel data Control channel 1
Slot No.0
Slot No.1
Slot No.2
Slot No.3 REDG=0, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0001, FL[3:0]=1110 (Frame length: 128 bits), TDRA[3:0]=0010, TDRE=1, RDRA[3:0]=0010, RDRE=1, CD1A[3:0]=0011 CD1E=1,
Specifications: TRMD[1:0]=00 or 10, TDLE=1, RDLE=1, CD0E=1,
Figure 16.7 Control Data Interface (Slot Position)
Rev. 6.00 Jul. 15, 2009 Page 483 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Control by Secondary FS (Slave Mode 2): The CODEC normally outputs the SIOFSYNC signal as synchronization pulse (FS). In this method, the CODEC outputs the secondary FS specific to the control data transfer after 1/2 frame time has been passed (not the normal FS output timing) to transmit or receive control data. This method is valid for SIOF slave mode. The following summarizes the control data interface procedure by the secondary FS. * Transmit normal transmit data of LSB = 0 (the SIOF forcibly clears 0). * To execute control data transmission, send transmit data of LSB = 1 (the SIOF forcibly set to 1 by writing SITCDR). * The CODEC outputs the secondary FS. * The SIOF transmits or receives (stores in SIRCDR) control data (data specified by SITCDR) synchronously with the secondary FS. Figure 16.8 shows an example of the control data interface timing by the secondary FS.
1 frame 1/2 frame 1/2 frame
SIOFSCK SIOFSYNC SIOFTxD SIOFRxD
L-channel data
Normal FS
Secondary FS
Normal FS
Slot No.0
LSB=1 (Secondary FS request) REDG=0, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0000,
Control channel 0 Slot No.0 FL[3:0]=1110 (Frame length: 128 bits), TDRA[3:0]=0000, TDRE=0, RDRA[3:0]=0000, RDRE=0, CD1A[3:0]=0000 CD1E=0,
Specifications: TRMD[1:0]=01, TDLE=1, RDLE=1, CD0E=1,
Figure 16.8 Control Data Interface (Secondary FS)
Rev. 6.00 Jul. 15, 2009 Page 484 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.6
FIFO
Overview: The transmit and receive FIFOs of the SIOF have the following features. * 16-stage 32-bit FIFOs for transmission and reception * The FIFO pointer can be updated in one read or write cycle regardless of access size of the CPU and DMAC. (One-stage 32-bit FIFO access cannot be divided into multiple accesses.) Transfer Request: The transfer request of the FIFO can be issued to the CPU or DMAC as the following interrupt sources. * FIFO transmit request: TDREQ (transmit interrupt source) * FIFO receive request: RDREQ (receive interrupt source) The request conditions for FIFO transmit or receive can be specified individually. The request conditions for the FIFO transmit and receive are specified by the TFWM2 to TFWM0 bits and RFWM2 to RFWM0 bits in SIFCTR, respectively. Tables 16.9 and 16.10 summarize the conditions specified by SIFCTR. Table 16.9 Conditions to Issue Transmit Request
TFWM2 to TFWM0 000 100 101 110 111 Number of Requested Stages 1 4 8 12 16 Transmit Request Empty area is 16 stages Empty area is 12 stages or more Empty area is 8 stages or more Empty area is 4 stages or more Empty area is 1 stage or more Largest Used Areas Smallest
Table 16.10 Conditions to Issue Receive Request
RFWM2 to RFWM0 000 100 101 110 111 Number of Requested Stages 1 4 8 12 16 Receive Request Valid data is 1 stage or more Valid data is 4 stages or more Valid data is 8 stages or more Valid data is 12 stages or more Valid data is 16 stages Largest Used Areas Smallest
Rev. 6.00 Jul. 15, 2009 Page 485 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
The number of stages of the FIFO is always sixteen even if the data area or empty area exceeds the FIFO size (the number of FIFOs). Accordingly, an overflow error or underflow error occurs if data area or empty area exceeds sixteen FIFO stages. The FIFO transmit or receive request is canceled when the above condition is not satisfied even if the FIFO is not empty or full. Number of FIFOs: The number of FIFO stages used in transmission and reception is indicated by the following register. * Transmit FIFO: The number of empty FIFO stages is indicated by the TFUA4 to TFUA0 bits in SIFCTR. * Receive FIFO: The number of valid data stages is indicated by the RFUA4 to RFUA0 bits in SIFCTR. The above indicate possible data numbers that can be transferred by the CPU or DMAC.
Rev. 6.00 Jul. 15, 2009 Page 486 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.7
Transmit and Receive Procedures
Transmission/Reception and Transmission in Master Mode: Figure 16.9 (1) shows an example of settings and operation for master mode transmission/reception. Figure 16.9 (2) shows an example of settings and operation for master mode transmission.
Rev. 6.00 Jul. 15, 2009 Page 487 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
No. 1
Flow Chart Start Set SIMDR, SISCR, SITDAR, SIRDAR, SICDAR, and SIFCTR
SIOF Settings Set operating mode, serial clock, slot positions for transmit/receive data, slot position for control data, and FIFO request threshold value Set operation start for baud rate generator Set the start for frame synchronous signal output Enable transmission and reception
SIOF Operation
2 Set the SCKE bit in SICTR to 1 3 Set the FSE bit in SICTR to 1 4 Set the TXE and RXE bit in SICTR to 1 5 No TDREQ = 1? Yes 6 7 Transmit SITDR from SIOFTXD synchronously with SIOFSYNC 8 No RDREQ = 1? Yes 9 10 No Transfer complete? Yes 11 12 Clear the FSE bit in SICTR to 0 Clear the TXE bit and RXE bit in SICTR to 0 Read SIRDR register Set the SITDR register
Note: Serial clock will not be output from the pin until communication is actually started.
Note: Communication is actually started after SITDR has been written.
Set transmit data
Transmission and reception are carried out simultaneously (Even when transmission is not necessary, dummy transmission must be performed. The output of dummy transmission can be masked by setting the pin function).
Read receive data Transmission and reception are carried out simultaneously, please check the TFEMP bit in SISTR (the transmit FIFO is empty?) and build a waiting loop to check the communication finished. Disable transmission To be prepared for the transmission/ reception that is resumed later, set the FSE bit to '0' to synchronize the frame in this LSI. To be prepared for the transmission/ reception that is resumed later, initialize inside the baud rate generator. End transmission
13
Set the MSSEL bit in SISCR to 1 Set the BPRS to 00000 and the BRDV to 111 in SISCR Apply a pulse to bits TxRST and RxRST in the SICTR (input 010) Set the SISCR to set the baud rate and the master clock source again
14 Change communication mode ? Yes 15 With FSE = 0, TXE = 0, and RXE = 0 held, start setting other bits. No
END
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 3 of this flowchart. Go on to 'Start' of the corresponding flowchart.
Note: * When interrupts due to transmit data underflow are enabled, after setting the no. 6 transmit data, the TXE bit should be set to 1.
Figure 16.9 (1) Transmission/Reception Operation in Master Mode (Example of Reception and Full-Duplex Transmission by the CPU with TDMAE=0)
Rev. 6.00 Jul. 15, 2009 Page 488 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
No. 1
Flow Chart Start Set SIMDR, SISCR, SITDAR, SIRDAR, SICDAR, and SIFCTR
SIOF Settings Set operating mode, serial clock, slot positions for transmit/receive data, slot position for control data, and FIFO request threshold value Set operation start for baud rate generator Set the start for frame synchronous signal output Enable transmission and reception
SIOF Operation
2 Set the SCKE bit to 1 in SICTR 3 Set the FSE bit in SICTR to 1 4 Set the TXE, and RXE bit in SICTR to 1 5 TDREQ = 1? Yes 6 7 Transmit SITDR from SIOFTXD synchronously with SIOFSYNC 8 Transfer complete? Yes 9 10 Clear the FSE bit in SICTR to 0 Clear the TXE bit in SICTR to 0 No Set SITDR register No
Note: Serial clock will not be output from the pin until communication is actually started.
Note: Communication is actually started after SITDR has been written.
Set transmit data Transmission
* Please check the TFEMP bit in SISTR (the transmit FIFO is empty?) and build a waiting loop to check the communication finished. Disable transmission To be prepared for the transmission/ reception that is resumed later, set the FSE bit to '0' to synchronize the frame in this LSI. To be prepared for the transmission/ reception that is resumed later, initialize inside the baud rate generator. End of transmission
11
Set the MSSEL bit in SISCR to 1 Set the BPRS to 00000 and the BRDV to 111 in SISCR Apply a pulse to bits TxRST and RxRST in the SICTR (input 010) Set the SISCR register to set the baud rate and the master clock source again
12 Change communication mode ? Yes 13 No
END
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 3 of this flowchart. Go on to 'Start' of the corresponding flowchart.
With FSE = 0, TXE = 0, and RXE = 0 held, start setting other bits.
Note: * When interrupts due to transmit data underflow are enabled, after setting the no. 6 transmit data, the TXE bit should be set to 1.
Figure 16.9 (2) Transmission Operation in Master Mode (Example of Half-Duplex Transmission by the CPU with TDMAE=0)
Rev. 6.00 Jul. 15, 2009 Page 489 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Reception in Master Mode: Figure 16.10 shows an example of settings and operation for master mode reception.
No. Flow Chart Start 1 SIOF Settings SIOF Operation
Set SIMDR, SISCR, SITDAR, SIRDAR, SICDAR, and SIFCTR
Set operating mode, serial clock, slot positions for transmit/receive data, slot position for control data, and FIFO request threshold value Set operation start for baud rate generator
2
Set the SCKE bit in SICTR to 1
3
Start SIOFSCK output
Output serial clock
4
Set the FSE and RXE bits in SICTR to 1
Set the start for frame synchronous Output frame synchronous signal output and enable signal reception
5
Store SIOFRXD receive data in SIRDR synchronously with SIOFSYNC
Issue receive transfer request according to the receive FIFO threshold value
6
RDREQ = 1? Yes
No
Reception
7
Read SIRDR
Read receive data
Transfer ended? 8 Yes
No Set to disable reception End reception
Clear the RXE bit in SICTR to 0 End
Figure 16.10 Example of Receive Operation in Master Mode
Rev. 6.00 Jul. 15, 2009 Page 490 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Transmission in Slave Mode: Figure 16.11 shows an example of settings and operation for slave mode transmission.
No. Flow Chart Start 1 Set operating mode, serial clock, slot positions for transmit/receive data, slot position for control data, and FIFO request threshold value SIOF Settings SIOF Operation
Set SIMDR, SISCR, SITDAR, SIRDAR, SICDAR, and SIFCTR
2
Set the TXE bit in SICTR to 1
Set to enable transmission
Issue transmit transfer request to enable transmission when frame synchronous signal is input
3
TDREQ = 1? Yes
No
4
Set SITDR
Set transmit data
5
Transmit SITDR from SIOFTXD synchronously with SIOFSYNC
Transmit
Transfer ended? Yes 6
No Set to disable transmission End transmission
Clear the TXE bit in SICTR to 0 End
Figure 16.11 Example of Transmit Operation in Slave Mode
Rev. 6.00 Jul. 15, 2009 Page 491 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Reception in Slave Mode: Figure 16.12 shows an example of settings and operation for slave mode reception.
No. Flow Chart Start 1 Set SIMDR, SISCR, SITDAR, SIRDAR, SICDAR, and SIFCTR SIOF Settings SIOF Operation
Set operating mode, serial clock, slot positions for transmit/receive data, slot position for control data, and FIFO request threshold value Set to enable reception Enable reception when the frame synchronous signal is input Issue receive transfer request according to the receive FIFO threshold value
2
Set the RXE bit in SICTR to 1
3
Store SIOFRXD receive data in SIRDR synchronously with SIOFSYNC
4
RDREQ = 1? Yes
No
Reception
5
Read SIRDR
Read receive data
Transfer ended? 6 Yes
No Set to disable reception End reception
Clear the RXE bit in SICTR to 0 End
Figure 16.12 Example of Receive Operation in Slave Mode
Rev. 6.00 Jul. 15, 2009 Page 492 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Transmit/Receive Reset: The SIOF can separately reset the transmit and receive units by setting the following bits to 1. * Transmit reset: TXRST bit in SICTR * Receive reset: RXRST bit in SICTR Table 16.11 shows the details of initialization upon transmit or receive reset. Table 16.11 Transmit and Receive Reset
Type Transmit reset Objects Initialized SITDR Transmit FIFO write pointer and read pointer TCRDY, TFEMP, and TDREQ bits in SISTR TXE bit in SICTR Receive reset SIRDR Receive FIFO write pointer and read pointer RCRDY, RFFUL, and RDREQ bits in SISTR RXE bit in SICTR
Module Stop Mode: The SIOF stops the transmit/receive operation in module stop mode. And all the registers in SIOF are retained.
Rev. 6.00 Jul. 15, 2009 Page 493 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.8
Interrupts
The SIOF has one type of interrupt. Interrupt Sources: Interrupts can be issued by several sources. Each source is shown as an SIOF status in SISTR. Table 16.12 lists the SIOF interrupt sources. Table 16.12 SIOF Interrupt Sources
No. Classification 1 2 3 4 5 6 7 8 Error Control Reception Transmission Bit Name TDREQ TFEMP RDREQ RFFUL TCRDY RCRDY TFUDF TFOVF Function Name Description
Transmit FIFO transfer The transmit FIFO stores data of request specified size or more. Transmit FIFO empty Receive FIFO transfer request Receive FIFO full Transmit control data ready Receive control data ready Transmit FIFO underflow The transmit FIFO is empty. The receive FIFO stores data of specified size or more. The receive FIFO is full. The transmit control register is ready to be written. The receive control data register stores valid data. Serial data transmit timing has arrived while the transmit FIFO is empty.
Transmit FIFO overflow Write to the transmit FIFO is performed while the transmit FIFO is full. Receive FIFO overflow Serial data is received while the receive FIFO is full. Receive FIFO underflow FS error The receive FIFO is read while the receive FIFO is empty. A synchronous signal is input before the specified bit number has been passed (in slave mode). The same slot is specified in both serial data and control data.
9 10 11
RFOVF RFUDF FSERR
12
SAERR
Assign error
Whether an interrupt is issued or not as the result of an interrupt source is determined by the SIIER settings. If an interrupt source is set to 1 and the corresponding bit in SIIER is set to 1, an SIOF interrupt is issued.
Rev. 6.00 Jul. 15, 2009 Page 494 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Regarding Transmit and Receive Classification: The transmit sources and receive sources are signals indicating the state; after being set, if the state changes, they are automatically cleared by the SIOF. When the DMA transfer is used, a DMA transfer request is pulled low (0 level) for one cycle at the end of DMA transfer. Processing when Errors Occur: On occurrence of each of the errors indicated as a status in SISTR, the SIOF performs the following operations. * Transmit FIFO underflow (TFUDF) The immediately preceding transmit data is again transmitted. * Transmit FIFO overflow (TFOVF) The contents of the transmit FIFO are protected, and the write operation causing the overflow is ignored. * Receive FIFO overflow (RFOVF) Data causing the overflow is discarded and lost. * Receive FIFO underflow (RFUDF) An undefined value is output on the bus. * FS error (FSERR) The internal counter is reset according to the FSYN signal in which an error occurs. * Assign error (SAERR) If the same slot is assigned to both serial data and control data, the slot is assigned to serial data. If the same slot is assigned to two control data items, data cannot be transferred correctly.
Rev. 6.00 Jul. 15, 2009 Page 495 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.9
Transmit and Receive Timing
Examples of the SIOF serial transmission and reception are shown in figures 16.13 to 16.19. 8-bit Monaural Data (1): Synchronous pulse method, falling edge sampling, slot No.0 used for transmit and receive data, an frame length = 8 bits
1 frame
SIOFSCK SIOFSYNC SIOFTxD L-channel data SIOFRxD Slot No.0 1-bit delay Specifications: TRMD[1:0]=00 or 10, TDLE=1, RDLE=1, CD0E=0, REDG=0, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0000, FL[3:0]=0000 (frame length: 8 bits) TDRE=0, TDRA[3:0]=0000, RDRE=0, RDRA[3:0]=0000, CD1E=0, CD1A[3:0]=0000
Figure 16.13 Transmit and Receive Timing (8-Bit Monaural Data (1)) 8-bit Monaural Data (2): Synchronous pulse method, falling edge sampling, slot No.0 used for transmit and receive data, and frame length = 16 bits
1 frame
SIOFSCK SIOFSYNC SIOFTxD L-channel data SIOFRxD Slot No.0 1-bit delay Specifications: TRMD[1:0]=00 or 10, TDLE=1, RDLE=1, CD0E=0, REDG=0, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0000, FL[3:0]=0100 (frame length: 16 bits) TDRE=0, TDRA[3:0]=0000, RDRE=0, RDRA[3:0]=0000, CD1E=0, CD1A[3:0]=0000 Slot No.1
Figure 16.14 Transmit and Receive Timing (8-Bit Monaural Data (2))
Rev. 6.00 Jul. 15, 2009 Page 496 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16-bit Monaural Data (1): Synchronous pulse method, falling edge sampling, slot No.0 used for transmit and receive data, and frame length = 64 bits
1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD L-channel data Slot No.0 1-bit delay Specifications: TRMD[1:0]=00 or 10, TDLE=1, RDLE=1, CD0E=0, REDG=0, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0000, FL[3:0]=1101 (frame length: 64 bits) TDRA[3:0]=0000, TDRE=0, RDRA[3:0]=0000, RDRE=0, CD1A[3:0]=0000 CD1E=0, Slot No.1 Slot No.2 Slot No.3
Figure 16.15 Transmit and Receive Timing (16-Bit Monaural Data (1)) 16-bit Stereo Data (1): L/R method, rising edge sampling, slot No.0 used for left channel data, slot No.1 used for right channel data, and frame length = 32 bits
1 frame SIOFSCK SIOFSYNC SIOFTxD L-channel data SIOFRxD No bit delay Specifications: TRMD[1:0]=11, TDLE=1, RDLE=1, CD0E=0, REDG=1, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0000, FL[3:0]=1100 (frame length: 32 bits) TDRA[3:0]=0001, TDRE=1, RDRA[3:0]=0001, RDRE=1, CD1A[3:0]=0000 CD1E=0, Slot No.0 R-channel data Slot No.1
Figure 16.16 Transmit and Receive Timing (16-Bit Stereo Data (1))
Rev. 6.00 Jul. 15, 2009 Page 497 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16-bit Stereo Data (2): L/R method, rising edge sampling, slot No.0 used for left-channel transmit data, slot No.1 used for left-channel receive data, slot No.2 used for right-channel transmit data, slot No.3 used for right-channel receive data, and frame length = 64 bits
1 frame SIOFSCK SIOFSYNC SIOFTxD L-channel data R-channel data
SIOFRxD Slot No.0 No bit delay
L-channel data Slot No.1 Slot No.2
R-channel data Slot No.3
Specifications: TRMD[1:0]=01, TDLE=1, RDLE=1, CD0E=0,
REDG=1, TDLA[3:0]=0000, RDLA[3:0]=0001, CD0A[3:0]=0000,
FL[3:0]=1101 (frame length: 64 bits), TDRA[3:0]=0010, TDRE=1, RDRA[3:0]=0011, RDRE=1, CD1A[3:0]=0000 CD1E=0,
Figure 16.17 Transmit and Receive Timing (16-Bit Stereo Data (2)) 16-bit Stereo Data (3): Synchronous pulse method, falling edge sampling, slot No.0 used for leftchannel data, slot No.1 used for right-channel data, slot No.2 used for control channel 0 data, slot No.3 used for control channel 1 data, and frame length = 128 bits
1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD
L-channel data R-channel data
Slot No.0
Slot No.1
Control Control channel 0 channel 1 Slot No.2 Slot No.3 Slot No.4
Slot No.5
Slot No.6
Slot No.7
1 bit delay Specifications: TRMD[1:0]=00 or 10,REDG=0, TDLA[3:0]=0000, TDLE=1, RDLA[3:0]=0000, RDLE=1, CD0A[3:0]=0010, CD0E=1, FL[3:0]=1110 (frame length: 128 bits), TDRA[3:0]=0001, TDRE=1, RDRA[3:0]=0001, RDRE=1, CD1A[3:0]=0011 CD1E=1,
Figure 16.18 Transmit and Receive Timing (16-Bit Stereo Data (3))
Rev. 6.00 Jul. 15, 2009 Page 498 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16-bit Stereo Data (4): Synchronous pulse method, falling edge sampling, slot No.0 used for leftchannel data, slot No.2 used for right-channel data, slot No.1 used for control channel 0 data, slot No.3 used for control channel 1 data, and frame length = 128 bits
1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD
L-channel data R-channel Control Control data channel 0 channel 1 Slot No.1 Slot No.2 Slot No.3 Slot No.4
Slot No.0
Slot No.5
Slot No.6
Slot No.7
1 bit delay Specifications: TRMD[1:0]=00 or 10, TDLE=1, RDLE=1, CD0E=1, REDG=1, TDLA[3:0]=0000, RDLA[3:0]=0000, CD0A[3:0]=0001, FL[3:0]=1110 (frame length: 128 bits) TDRA[3:0]=0010, TDRE=1, RDRA[3:0]=0010, RDRE=1, CD1A[3:0]=0011 CD1E=1,
Figure 16.19 Transmit and Receive Timing (16-Bit Stereo Data (4)) Synchronization-Pulse Output Mode at End of Each Slot (SYNCAT Bit = 1): Synchronous pulse method, falling edge sampling, slot No.0 used for left-channel data, slot No.1 used for rightchannel data, slot No.2 used for control channel 0 data, slot No.3 used for control channel 1 data, and frame length = 128 bits In this mode, valid data must be set to slot No. 0.
1 frame SIOFSCK SIOFSYNC SIOFTxD SIOFRxD
L-channel data R-channel data
Slot No.0
Slot No.1
Control channel 0 Slot No.2
Control channel 1 Slot No.3
Slot No.4
Slot No.5
Slot No.6
Slot No.7
Specifications: TRMD[1:0]=00 or 10,REDG=0, TDLA[3:0]=0000, TDLE=1, RDLA[3:0]=0000, RDLE=1, CD0A[3:0]=0010, CD0E=1,
FL[3:0]=1110 (frame length: 128 bits), TDRA[3:0]=0001, TDRE=1, RDRA[3:0]=0001, RDRE=1, CD1A[3:0]=0011 CD1E=1,
Figure 16.20 Transmit and Receive Timing (16-Bit Stereo Data)
Rev. 6.00 Jul. 15, 2009 Page 499 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
[Notes on Usage] 1. Defect in Frame Synchronous Signal (SYNC) Length (a) Phenomena With the SIOF Master Mode 2, in some case, the length of the SYNC signal in high level error occurs by changing the SYNC signal output condition from disabled (the FSE bit = 0) to enabled (the FSE bit = 1). In the above case, the SYNC signal rises before the correct timing and the length of the signal in high level will be 1 bit longer in the first frame than the value set in the SIMDR, whereas the error DOES NOT occur after second frame.
In the first frame, the length of the SYNC signal in high level is 1 bit longer than the value set in the SIMDR. 17 bits SYNC 16 bits 16 bits 16 bits
TxD
32 bits (valid data) 1 bit (Example): With the SIOF Master Mode 2, Frame Length = 32 bits
32 bits (valid data)
(b) Defect prevention *Please take following procedures (i) or (ii). (i) In the case of setting a data, please write a dummy data for the first frame and the valid data for other frames into the transmit FIFO, and set the destination stations to discard the data in the first frame. (ii) In the use of this product, please make your system composition that works correctly even in the case that the length of the SYNC signal will be 1 bit longer. 2. Resume Data Transmission with the SIOF Master Mode (a) Defect data transmission With the SIOF master mode, in some case, the data is NOT transmitted correctly when the transmission operation is resumed after stopping the previous transmission operation by setting `0' to the TXE bit.
Rev. 6.00 Jul. 15, 2009 Page 500 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
(b) Cause of the Defect After the transmission, the SIOF will be reset and initialized by setting the TXE bit in the SICTR to `0' with the SIOF master mode 1/2. However, if that SIOF fails to be reset, the transmission will resume without the transmission module initialized and the defect mentioned above will occur. (c) Defect prevention Please change the setting of SCK temporarily to make reset the modules using the CK clock surely, specifically, whenever the TXE bit or the RXE bit in SICTR is set to `0', please take the procedures as follows; (i) Set the P as the master clock source. (Set the MSSEL bit in SISCR to `1' (master clock = P).) (ii) Set the master clock division ratio according with the count value of the prescalar of the baud rate generator as x1/1. (Set the bits BRPS[4:0] in SISCR to `0000' (as the master clock frequency x1/1)). (iii) Set the frequency division ratio for the output stage of the baud rate generator as x1/1. (Set the bits BRDV[2:0] in SISCR to `111' (as the prescalar output frequency x1/1).) (iv) Reset the transmission/reception operation. (Set the TXRST bit (or RXST bit) in the SICTR to `1' (reset).) (v) Set the value of SISCR for transmission/reception again, before start of next transmission/reception.
Rev. 6.00 Jul. 15, 2009 Page 501 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
16.4.10 SPI Mode SPI-mode operation is selected for the SIOF by the setting in SPICR. Example of Configuration: Figure 16.21 shows an example of the configuration for SPI-mode communications.
Master SPI Transmit FIFO P/S MOSI Slave 0 SPI
Receive FIFO
S/P
MISO SS0 SS
Baud rate generator
SCK
Figure 16.21 Example of Configuration in SPI Mode SPI Operation: The states of operation in SPI mode are described in terms of transmission and reception in table 16.13. In SPI mode, the data length is fixed to 8 bits and the values of the upper 8 bits of SITDR and SIRDR are the valid data for transmission and reception, respectively. Fixed master mode can perform the full-duplex communication with the SPI slave devices continuously. That is, 8-bit data is continuously transmitted/received, and resetting of transmit/receive operation by the TXRST or RXRST bit with SCK = P controls the respective frames.
31 SITDR/SIRDR Data 24 23 0
The shaded part is the data which is transmitted or received.
Rev. 6.00 Jul. 15, 2009 Page 502 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
The only sources of interrupts that should be enabled in SPI-mode transfer are transmit data transfer request (TDREQ), transmit FIFO empty (TFEMP), receive-data transfer request (RDREQ), receive-FIFO full (RFFUL), and receive-FIFO overflow (RFOVF). Enabled or disabled states are selectable by the interrupt enable register (SIIER). Interrupts from other sources must be disabled at all times. For the DMA transfer requests, the enabled sources are transmit-data DMA transfer request (TDMA) and receive-data DMA transfer request (RDMA). Enabled or disabled states are selectable by the interrupt enable register (SIIER). In SPI mode, the baud rate is set by SISCR. Table 16.13 States of Transmit and Receive Operations in SPI Mode
TXE 0 0 RXE 0 1 TDMAE Don't care 0 RDMAE Don't care 1 SPI Transmit/Receive Operation Transmission/reception is disabled Half-Duplex Reception The transmit FIFO does not operate and dummy data is transmitted from the MOSI. Data received at the MISO is stored in the receive FIFO and is transferred by using the DMA. Receive operation continues as long as RE bit = 1; the receive-FIFO overflow (RFOVF) status is set after the receive FIFO has become full and further receive data is ignored. 1 0 0 0 Half-Duplex Transmission The data in the transmit FIFO is transmitted from the MOSI. The receive FIFO does not operate, and data on the MISO is ignored. When the transmit FIFO becomes empty, the transmit operation is completed. 1 0 Half-Duplex Transmission The data which has been transferred by using the DMA to the transmit FIFO is transmitted from the MOSI. The receive FIFO does not operate and data on the MISO is ignored. When the transmit FIFO becomes empty, the transmit operation is completed.
Rev. 6.00 Jul. 15, 2009 Page 503 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
TXE 1
RXE 1
TDMAE 0
RDMAE 0
SPI Transmit/Receive Operation Full-Duplex Communication The transmit and receive FIFOs operate at the same time. Data in the transmit FIFO are transmitted or received. When there is no data left in the transmit FIFO, the transmit and receive operations end. Note that even if only reception is to be done, dummy transmission is necessary because only master mode is allowed in the SPI mode.
Note: In SPI mode, settings other than the above are prohibited.
In half-duplex reception (transmission is disabled), the value output from the MOSI can be controlled by the TXDIZ bit in SIMDR as follows. TXDIZ = 0: Transmission is disabled, 1 is output on the MOSI. TXDIZ = 1: Transmission is disabled, the MOSI is in the high-impedance state. Serial Clock Timing: Timing on the data and clock lines in SPI mode is shown in figures 16.22 and 16.23. The user can select from four serial transfer formats, which differ according to the phase and polarity of the serial clock.
SCK (CPOL = 0) (CPOL = 1) Sampling MISO/MOSI SS0 Ts Th Td MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB
Ts: The setup time for the SCK edge. The minimum value is 1/2 of the period of the SCK. The setting is made by the SSAST1 and SSAST0 bits in SPICR. Th: The hold time for the SCK edge. The minimum value is 0. Td: The idle time. A number of SCK-clock cycles from 0 to 3 is set by the FLD1 and FLD0 bits in SPICR.
Figure 16.22 SPI Data/Clock Timing 1 (CPHA = 0)
Rev. 6.00 Jul. 15, 2009 Page 504 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
SCK (CPOL = 0) (CPOL = 1) Sampling MISO/MOSI SS0 Ts Th Td MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB
Ts: The setup time for the SCK edge. The minimum value is 0. The setting is made by the SSAST1 and SSAST0 bits in SPICR. Th: The hold time for the SCK edge. The minimum value is 1/2 of the period of the SCK. Td: The idle time. A number of SCK-clock cycles from 0 to 3 is set by the FLD1 and FLD0 bits in SPICR.
Figure 16.23 SPI Data/Clock Timing 2 (CPHA = 1)
Rev. 6.00 Jul. 15, 2009 Page 505 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Procedures for Transmission/Reception: Shown in figures 16.24 to 16.27 are examples of settings for SPI transmission/reception along with the corresponding operations.
No.
Time chart
Start
SIOF Setting
SIOF Operation
1
Set SISCR, SIFCTR, and SPICR.
Set the serial clock and threshold values for FIFO.
[Note] In SPI mode, registers SIMDR, SITDAR, SIRDAR, and SICDAR should be set to their initial values.
2 3
Set the SCKE bit in SICTR to 1.
Start baud rate generator operation.
[Note] Serial clock will not be output form the pin until communication is actually started. [Note] Communication is actually started after SITDR has been written.
Set the FSE bit in SICTR to 1. Set the TXE and RXE bits in SICTR to 1.*
Initialize the frame in the SIOF (ie, initialize the state of signal SS0), and enable transmission and reception.
4
TDREQ=1? Yes
No
5 6
Set the SITDR register.
Synchronously to SS0, output the contents of SITDR from MOSI and receive data from MISO.
Set the data for transmission. Executes transmission and reception simultaneously. (Even when transmission is not necessary, dummy transmission must be performed. The output of dummy transmission can be masked by setting the pin function.)
7
RDREQ=1? Yes
No
8 9
Read the SIRDR register. No
Read the received data. Check SISTR.TFEMP (transmit FIFO empty) and ensure completion of communication by using a wait loop or other means. (Checking SISTR.TFEMP is enough to confirm the completion of simultaneous transmission and reception.) Disable transmission and reception. To be prepared for the transmission/reception that is resumed later, set FSE = 0 to synchronize the frame in this LSI. Transmission/reception end.
Transfer complete? Yes
10 11
Clear the TXE and RXE bits in SICTR to 0. Clear the FSE bit in SICTR to 0. Set BPRS = 00000 and BRDV = 111 in the SISCR register.
12
Apply a pulse to bits TxRST and RxRST in the SICTR register (0->1->0 input). Set the SISCR register to set the baud rate again.
Change communication mode?
To be prepared for the transmission/reception that is resumed later, initialize inside the baud rate generator.
No End
13
Yes
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 3 of this flowchart. Go on to 'Start' of the corresponding flowchart.
14
With FSE=0, TXE=0, and RXE=0 held, start setting other bits.
Note: * For the case when interrupt generation on transmit FIFO underflow is enabled, set the TXE bit to 1 after setting data for transmission at step No.5.
Figure 16.24 SPI Transmission/Reception Operation (Example of Full-Duplex Transmission/Reception by the CPU with TDMAE = 0)
Rev. 6.00 Jul. 15, 2009 Page 506 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
No.
Time chart
Start
SIOF Setting
SIOF Operation
[Note] In SPI mode, registers SIMDR, SITDAR, SIRDAR, and SICDAR should be set to their initial values.
1
Set SISCR, SIFCTR, and SPICR.
Set the serial clock and threshold values for FIFO.
2 3 4 5 6 7
Set the SCKE bit in SICTR to 1. Set the FSE bit in SICTR to 1. Set the TXE bit in SICTR to 1.* No
Start baud rate generator operation.
[Note] Serial clock will not be output form the pin until communication is actually started. [Note] Communication is actually started after SITDR has been written.
Initialize the frame in the SIOF (ie, initialize the state of signal SS0), and enable transmission.
TDREQ=1? Yes Set the SITDR register. Synchronously to SS0, output the contents of SITDR from MOSI. Transfer complete? Yes
Set the data for transmission.
Executes transmission.
No
Check SISTR.TFEMP (transmit FIFO empty) and ensure completion of communication by using a wait loop or other means.
8 9
Clear the TXE bit in SICTR to 0.
Disable transmission. To be prepared for the transmission/reception that is resumed later, set FSE = 0 to synchronize the frame in this LSI.
Transmission ends.
Clear the FSE bit in SICTR to 0.
Set BPRS = 00000 and BRDV = 111 in the SISCR register.
10
Apply a pulse to bit TxRST in the SICTR register (0->1->0 input). Set the SISCR register to set the baud rate again.
Change communication mode?
To be prepared for the transmission/reception that is resumed later, initialize inside the baud rate generator.
11
No End
Yes
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 3 of this flowchart. Go on to 'Start' of the corresponding flowchart.
12
With FSE=0, TXE=0, and RXE=0 held, start setting other bits.
Note: * For the case when interrupt generation on transmit FIFO underflow is enabled, set the TXE bit to 1 after setting data for transmission at step No.5.
Figure 16.25 SPI Transmission Operation (Example of Half-Duplex Transmission by the CPU with TDMAE = 0)
Rev. 6.00 Jul. 15, 2009 Page 507 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
No.
Time Chart
Start
SIOF/DMA Setting
SIOF/DMA Operation
1
Make settings for DMA.
Complete setting for DMA before making settings for the SIOF.
2 3 4
Set SISCR, SIFCTR, SPICR, and SIIER.
Set the serial clock, threshold values for FIFO, and TDMAE = 1
[Note] In SPI mode, registers SIMDR, SITDAR, SIRDAR, and SICDAR should be set to their initial values. [Note] Serial clock will not be output form the pin until communication is actually started. [Note] Communication is actually started after SITDR has been written.
Set the SCKE bit in SICTR to 1. Set the FSE bit in SICTR to 1. Set the TXE bit in SICTR to 1. No
Start baud rate generator operation.
Initialize the frame in the SIOF (ie, initialize the state of signal SS0), and enable transmission.
5 6 7 8 9 10
TDREQ=1? Yes
DMA transfer (Set the SITDR register.) Synchronously to SS0, output the contents of SITDR from MOSI. Transfer complete? Yes Clear the TXE bit in SICTR to 0. No
Set the data for transmission.
Executes transmission. For example, in the DMA transfer end interrupt service routine, check SISTR.TFEMP (transmit FIFO empty) and ensure completion of communication by using a wait loop. Disable transmission. To be prepared for the transmission/reception that is resumed later, set FSE = 0 to synchronize the frame in this LSI.
When the DMA transfr end interrupt is used, clear the IE bit in DMA.CHCRn before the execution returns from the interrupt service routine.
Transmission ends.
Clear the FSE bit in SICTR to 0. Set BPRS = 00000 and BRDV = 111 in the SISCR register.
11
Apply a pulse to bit TxRST in the SICTR register (0->1->0 input). Set the SISCR register to set the baud rate again.
Change communication mode?
To be prepared for the transmission/reception that is resumed later, initialize inside the baud rate generator.
No End
12 13
Yes With FSE=0, TXE=0, and RXE=0 held, start setting other bits.
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 4 of this flowchart. Go on to 'Start' of the corresponding flowchart.
Figure 16.26 SPI Transmission Operation (Example of Half-Duplex Transmission by DMA with TDMAE = 1)
Rev. 6.00 Jul. 15, 2009 Page 508 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
No.
Time Chart
Start
SIOF/DMA Setting
SIOF/DMA Operation
1
Make settings for DMA.
Complete setting for DMA before making settings for the SIOF.
2 3 4
Set SISCR, SIFCTR, SPICR, and SIIER.
Set the serial clock, threshold values for FIFO, and RDMAE = 1
[Note] In SPI mode, registers SIMDR, SITDAR, SIRDAR, and SICDAR should be set to their initial values.
Set the SCKE bit in SICTR to 1. Set the FSE bit in SICTR to 1. Set the RXE bit in SICTR to 1. RDREQ=1? Yes No
Start baud rate generator operation.
[Note] Serial clock will not be output form the pin until communication is actually started. [Note] Communication is actually started after RXE = 1 has been set.
Initialize the frame in the SIOF (ie, initialize the state of signal SS0), and enable reception.
5 6 7 8 9 10
DMA transfer (Read from the SIRDR register.) Synchronously to SS0, receive data from MISO. Transfer complete? Yes No
Read data from the SIRDR register.
Executes reception. At the point when a DEI interrupt is generated, reception has already proceeded excessively. Therefore, read the necessary amount of data from FIFO and skip the remainder, or cancel by RxRST. Disable reception. To be prepared for the transmission/reception that is resumed later, set FSE = 0 to synchronize the frame in this LSI.
When the DMA transfr end interrupt is used, clear the IE bit in DMA.CHCRn before the execution returns from the interrupt service routine. Reception ends.
Clear the RXE bit in SICTR to 0.
Clear the FSE bit in SICTR to 0. Set BPRS = 00000 and BRDV = 111 in the SISCR register.
11
Apply a pulse to bit RxRST in the SICTR register (0->1->0 input). Set the SISCR register to set the baud rate again.
Change communication mode?
To be prepared for the transmission/reception that is resumed later, initialize inside the baud rate generator.
No End
12 13
Yes With FSE=0, TXE=0, and RXE=0 held, start setting other bits.
If communication is not to be resumed (branching to No), no further setting is needed. To return to the same communication mode, go back to setting of FSE at step 4 of this flowchart. Go on to 'Start' of the corresponding flowchart.
Figure 16.27 SPI Reception Operation (Example of Half-Duplex Reception by DMA with RDMAE = 1)
Rev. 6.00 Jul. 15, 2009 Page 509 of 816 REJ09B0237-0600
Section 16 Serial I/O with FIFO (SIOF)
Rev. 6.00 Jul. 15, 2009 Page 510 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Section 17 Host Interface (HIF)
This LSI incorporates a host interface (HIF) for use in high-speed transfer of data between external devices which cannot utilize the system bus. The HIF allows external devices to read from and write to 2 kbytes (1 kbyte x 2 banks) of the onchip RAM exclusively for HIF use (HIFRAM) within this LSI, in 32-bit units. Interrupts issued to this LSI by an external device, interrupts sent from this LSI to the external device, and DMA transfer requests sent from this LSI to the external device are also supported. By using HIFRAM and these interrupt functions, software-based data transfer between external devices and this LSI becomes possible, and connection to external devices not releasing bus mastership is enabled. Using HIFRAM, the HIF also supports HIF boot mode allowing this LSI to be booted.
17.1
Features
The HIF has the following features. * An external device can read from or write to HIFRAM in 32-bit units via the HIF pins (access in 8-bit or 16-bit units not allowed). The on-chip CPU can read from or write to HIFRAM in 8bit, 16-bit, or 32-bit units, via the internal peripheral bus. The HIFRAM access mode can be specified as bank mode or non-bank mode. * When an external device accesses HIFRAM via the HIF pins, automatic increment of addresses and the endian can be specified with the HIF internal registers. * By writing to specific bits in the HIF internal registers from an external device, or by accessing the end address of HIFRAM from the external device, interrupts (internal interrupts) can be issued to the on-chip CPU. Conversely, by writing to specific bits in the HIF internal registers from the on-chip CPU, interrupts (external interrupts) or DMAC transfer requests can be sent from the on-chip CPU to the external device. * There are seven interrupt source bits each for internal interrupts and external interrupts. Accordingly, software control of 128 different interrupts is possible, enabling high-speed data transfer using interrupts. * In HIF boot mode, this LSI can be booted from HIFRAM by an external device storing the instruction code in HIFRAM.
Rev. 6.00 Jul. 15, 2009 Page 511 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Figure 17.1 shows a block diagram of the HIF.
HIF
HIFDATA HIFSCR
HIFRAM HIFRAM
HIFD15 to HIFD00
HIFEICR HIFBCR HIFADR
HIFMCR
HIFIICR
Select
HIFCS HIFRS HIFWR HIFRD HIFMD HIFINT HIFDREQ HIFRDY HIFEBL Control circuit HIFI HIFBI
[Legend] HIFIDX: HIFGSR: HIFSCR: HIFMCR: HIFIICR: HIFEICR:
HIF index register HIF general status register HIF status/control register HIF memory control register HIF internal interrupt control register HIF external interrupt control register
HIFBICR
HIFGSR
HIFDTR
HIFIDX
HIFADR: HIFDATA: HIFBCR: HIFDTR: HIFBICR: HIFI: HIFIB:
HIF address register HIF data register HIF boot control register HIFDREQ trigger register HIF bank interrupt control register HIF interrupt (internal interrupt) HIF bank interrupt (internal interrupt)
Figure 17.1 Block Diagram of HIF
Rev. 6.00 Jul. 15, 2009 Page 512 of 816 REJ09B0237-0600
Internal bus
Section 17 Host Interface (HIF)
17.2
Input/Output Pins
Table 17.1 shows the HIF pin configuration. Table 17.1 Pin Configuration
Name HIF data pins HIF chip select HIF register select Abbreviation HIFD15 to HIFD00 HIFCS HIFRS I/O I/O Input Input Description Address, data, or command input/output to the HIF Chip select input to the HIF Switching between HIF access types 0: Normal access (other than below) 1: Index register write or status register read HIF write HIF read HIF interrupt HIF mode HIFWR HIFRD HIFINT HIFMD Input Input Write strobe signal. Low level is input when an external device writes data to the HIF. Read strobe signal. Low level is input when an external device reads data from the HIF.
Output Interrupt request to an external device from the HIF Input Selects whether or not this LSI is started up in HIF boot mode. If a power-on reset is canceled when high level is input, this LSI is started up in HIF boot mode.
HIFDMAC transfer request HIF boot ready
HIFDREQ HIFRDY
Output To an external device, DMAC transfer request with HIFRAM as the destination Output Indicates that the HIF reset is canceled in this LSI and access from an external device to the HIF can be accepted. After 10 clock cycles (max.) of the peripheral clock following negate of the reset input pin of this LSI, this pin is asserted.
HIF pin enable
HIFEBL
Input
All HIF pins other than this pin are asserted by high-level input.
Rev. 6.00 Jul. 15, 2009 Page 513 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.3
17.3.1
Parallel Access
Operation
The HIF can be accessed by combining the HIFCS, HIFRS, HIFWR, and HIFRD pins. Table 17.2 shows the correspondence between combinations of these signals and HIF operations. Table 17.2 HIF Operations
HIFCS 1 0 0 0 0 0 0 [Legend] *: Don't care HIFRS * 0 0 1 1 * * HIFWR * 1 0 1 0 1 0 HIFRD * 0 1 0 1 1 0 Operation No operation (NOP) Read from register specified by HIFIDX[7:0] Write to register specified by HIFIDX[7:0] Read from status register (HIFGSR[7:0]) Write to index register (HIFIDX[7:0]) No operation (NOP) Setting prohibited
17.3.2
Connection Method
When connecting the HIF to an external device, a method like that shown in figure 17.2 should be used.
External device CS A02 WR RD D15 to D00 HIFCS HIFRS HIFWR HIFRD HIFD15 to HIFD00 HIF
Figure 17.2 HIF Connection Example
Rev. 6.00 Jul. 15, 2009 Page 514 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.4
Register Descriptions
The HIF has the following registers. * * * * * * * * * * * HIF index register (HIFIDX) HIF general status register (HIFGSR) HIF status/control register (HIFSCR) HIF memory control register (HIFMCR) HIF internal interrupt control register (HIFIICR) HIF external interrupt control register (HIFEICR) HIF address register (HIFADR) HIF data register (HIFDATA) HIF boot control register (HIFBCR) HIFDREQ trigger register (HIFDTR) HIF bank interrupt control register (HIFBICR) HIF Index Register (HIFIDX)
17.4.1
HIFIDX is a 32-bit register used to specify the register read from or written to by an external device when the HIFRS pin is held low. HIFIDX can be only read by the on-chip CPU. HIFIDX can be only written to by an external device while the HIFRS pin is driven high.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
31 to 8 --
Rev. 6.00 Jul. 15, 2009 Page 515 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 7 6 5 4 3 2
Bit Name REG5 REG4 REG3 REG2 REG1 REG0
Initial Value 0 0 0 0 0 0
R/W R/W* R/W* R/W* R/W* R/W* R/W*
Description HIF Internal Register Select These bits specify which register among HIFGSR, HIFSCR, HIFMCR, HIFIICR, HIFEICR, HIFADR, HIFDATA, and HIFBCR is accessed by an external device. 000000: HIFGSR 000001: HIFSCR 000010: HIFMCR 000011: HIFIICR 000100: HIFEICR 000101: HIFADR 000110: HIFDATA 001111: HIFBCR Other than above: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 516 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 1 0
Bit Name BYTE1 BYTE0
Initial Value 0 0
R/W R/W* R/W*
Description Internal Register Byte Specification These bits specify in advance the target word location before the external device accesses a register among HIFGSR, HIFSCR, HIFMCR, HIFIICR, HIFEICR, HIFADR, HIFDATA, and HIFBCR. See also section 17.9, Alignment Control. * When HIFSCR.BO = 0 00: Bits 31 to 16 in register 01: Setting prohibited 10: Bits 15 to 0 in register 11: Setting prohibited * When HIFSCR.BO = 1 00: Bits 15 to 0 in register 01: Setting prohibited 10: Bits 31 to 16 in register 11: Setting prohibited However, when HIFDATA is selected using bits REG5 to REG0, each time reading or writing of HIFDATA occurs, these bits change according to the following rule. 00 10 00 10... repeated
Note:
*
This bit can be only written to by an external device while the HIFRS pin is held high. It cannot be written to by the on-chip CPU.
Rev. 6.00 Jul. 15, 2009 Page 517 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.4.2
HIF General Status Register (HIFGSR)
HIFGSR is a 32-bit register, which can be freely used for handshaking between an external device connected to the HIF and the software of this LSI. HIFGSR can be read from and written to by the on-chip CPU. Reading from HIFGSR by an external device should be performed with the HIFRS pin high, or HIFGSR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low. Writing to HIFGSR by an external device should be performed with HIFGSR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit 31 to 16 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15 to 0 STATUS15 to All 0 STATUS0 R/W General Status This register can be read from and written to by an external device connected to the HIF, and by the onchip CPU. These bits are initialized only at a poweron reset.
17.4.3
HIF Status/Control Register (HIFSCR)
HIFSCR is a 32-bit register used to control the HIFRAM access mode and endian setting. HIFSCR can be read from and written to by the on-chip CPU. Access to HIFSCR by an external device should be performed with HIFSCR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit 31 to 12 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 518 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 11 10
Bit Name DMD DPOL
Initial Value 0 0
R/W R/W R/W
Description DREQ Mode DREQ Polarity Controls the assert mode for the HIFDREQ pin. For details on the negate timing, see section 17.8, External DMAC Interface. 00: For a DMAC transfer request to an external device, low level is generated at the HIFDREQ pin. The default for the HIFDREQ pin is high-level output. 01: For a DMAC transfer request to an external device, high level is generated at the HIFDREQ pin. The default for the HIFDREQ pin is low-level output. 10: For a DMAC transfer request to an external device, falling edge is generated at the HIFDREQ pin. The default for the HIFDREQ pin is high-level output. 11: For a DMAC transfer request to an external device, rising edge is generated at the HIFDREQ pin. The default for the HIFDREQ pin is low-level output.
9 8
BMD BSEL
0 0
R/W R/W
HIFRAM Bank Mode HIFRAM Bank Select Controls the HIFRAM access mode. 00: Both an external device and the on-chip CPU can access bank 0. When access by both of these conflict, even though the access addresses differ, access by the external device is processed before access by the on-chip CPU. Bank 1 cannot be accessed. 01: Both an external device and the on-chip CPU can access bank 1. When access by both of these conflict, even though the access addresses differ, access by the external device is processed before access by the on-chip CPU. Bank 0 cannot be accessed. 10: An external device can access only bank 0 while the on-chip CPU can access only bank 1. 11: An external device can access only bank 1 while the on-chip CPU can access only bank 0.
Rev. 6.00 Jul. 15, 2009 Page 519 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 7
Bit Name --
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
6
--
1
R
Reserved This bit is always read as 1. The write value should always be 1.
5
MD1
0/1
R
HIF Mode 1 Indicates whether this LSI was started up in HIF boot mode or non-HIF boot mode. This bit stores the value of the HIFMD pin sampled at a power-on reset 0: Started up in non-HIF boot mode (booted from the memory connected to area 0) 1: Started up in HIF boot mode (booted from HIFRAM)
4, 3
--
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
2
WBSWP
0
R/W
Byte Order for Access of HIFDATA Specifies the byte order when an external device accesses HIFDATA. See also section 17.9, Alignment Control. 0: Aligned according to the BO bit. 1: Swapped in word units from the big endian order and then swapped in byte units within each word. The setting of the BO bit is ignored.
1
EDN
0
R/W
Endian for HIFRAM Access Specifies the byte order when HIFRAM is accessed by the on-chip CPU. 0: Big endian (MSB first) 1: Little endian (LSB first)
Rev. 6.00 Jul. 15, 2009 Page 520 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 0
Bit Name BO
Initial Value 0
R/W R/W
Description Byte Order for Access of All HIF Registers Including HIFDATA Specifies the byte order when an external device accesses all HIF registers including HIFDATA. However, for the HIFDATA alignment, this bit is referred to only when WBSWP = 0 and ignored when WBSWP = 1. See also section 17.9, Alignment Control. 0: Big endian (MSB first) 1: Little endian (LSB first)
17.4.4
HIF Memory Control Register (HIFMCR)
HIFMCR is a 32-bit register used to control HIFRAM. HIFMCR can be only read by the on-chip CPU. Access to HIFMCR by an external device should be performed with HIFMCR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 LOCK 0 R/W* Lock This bit is used to lock the access direction (read or write) for consecutive access of HIFRAM by an external device via HIFDATA. When this bit is set to 1, the values of the RD and WT bits set at the same time are held until this bit is next cleared to 0. When the RD bit and this bit are simultaneously set to 1, consecutive read mode is entered. When the WT bit and this bit are simultaneously set to 1, consecutive write mode is entered. Both the RD and WT bits should not be set to 1 simultaneously. 6 -- 0 R Reserved This bit is always read as 0. The write value should always be 0.
31 to 8 --
Rev. 6.00 Jul. 15, 2009 Page 521 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 5
Bit Name WT
Initial Value 0
R/W R/W*
Description Write When this bit is set to 1, the HIFDATA value is written to the HIFRAM position corresponding to HIFADR. If this bit and the LOCK bit are set to 1 simultaneously, HIFRAM consecutive write mode is entered, and highspeed data transfer becomes possible. This mode is maintained until this bit is next cleared to 0, or until the LOCK bit is cleared to 0. If the LOCK bit is not simultaneously set to 1 with this bit, writing to HIFRAM is performed only once. Thereafter, the value of this bit is automatically cleared to 0.
4
--
0
R
Reserved This bit is always read as 0. The write value should always be 0.
3
RD
0
R/W*
Read When this bit is set to 1, the HIFRAM data corresponding to HIFADR is fetched to HIFDATA. If this bit and the LOCK bit are set to 1 simultaneously, HIFRAM consecutive read mode is entered, and highspeed data transfer becomes possible. This mode is maintained until this bit is next cleared to 0, or until the LOCK bit is cleared to 0. If the LOCK bit is not simultaneously set to 1 with this bit, reading of HIFRAM is performed only once. Thereafter, the value of this bit is automatically cleared to 0.
2, 1
--
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
0
AI/AD
0
R/W*
Address Auto-Increment/Decrement This bit is valid only when the LOCK bit is 1. The value of HIFADR is automatically incremented by 4 or decremented by 4 according to the setting of this bit each time reading or writing of HIFRAM is performed. 0: Auto-increment mode (+4) 1: Auto-decrement mode (-4)
Note:
*
This bit can be only written to by an external device when the HIFRS pin is low. It cannot be written to by the on-chip CPU. Changing the HIFRAM banks accessible from an external device by setting the BMD and BSEL bits in HIFSCR does not affect the setting of this bit.
Rev. 6.00 Jul. 15, 2009 Page 522 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.4.5
HIF Internal Interrupt Control Register (HIFIICR)
HIFIICR is a 32-bit register used to issue interrupts from an external device connected to the HIF to the on-chip CPU. Access to HIFIICR by an external device should be performed with HIFIICR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 6 5 4 3 2 1 0 IIC6 IIC5 IIC4 IIC3 IIC2 IIC1 IIC0 IIR 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W Internal Interrupt Request While this bit is 1, an interrupt request (HIFI) is issued to the on-chip CPU. Internal Interrupt Source These bits specify the source for interrupts generated by the IIR bit. These bits can be written to from both an external device and the on-chip CPU. By using these bits, fast execution of interrupt exception handling is possible. These bits are completely under software control, and their values have no effect on the operation of this LSI.
31 to 8 --
17.4.6
HIF External Interrupt Control Register (HIFEICR)
HIFEICR is a 32-bit register used to issue interrupts to an external device connected to the HIF from this LSI. Access to HIFEICR by an external device should be performed with HIFEICR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
31 to 8 --
Rev. 6.00 Jul. 15, 2009 Page 523 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 7 6 5 4 3 2 1 0
Bit Name EIC6 EIC5 EIC4 EIC3 EIC2 EIC1 EIC0 EIR
Initial Value 0 0 0 0 0 0 0 0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
Description External Interrupt Source These bits specify the source for interrupts generated by the EIR bit. These bits can be written to from both an external device and the on-chip CPU. By using these bits, fast execution of interrupt exception handling is possible. These bits are completely under software control, and their values have no effect on the operation of this LSI.
External Interrupt Request While this bit is 1, the HIFINT pin is asserted to issue an interrupt request to an external device from this LSI.
17.4.7
HIF Address Register (HIFADR)
HIFADR is a 32-bit register which indicates the address in HIFRAM to be accessed by an external device. When using the LOCK bit setting in HIFMCR to specify consecutive access of HIFRAM, auto-increment (+4) or auto-decrement (-4) of the address, according to the AI/AD bit setting in HIFMCR, is performed automatically, and HIFADR is updated. HIFADR can be only read by the on-chip CPU. Access to HIFADR by an external device should be performed with HIFADR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit 31 to 10 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 9 to 2 A9 to A2 All 0 R/W* HIFRAM Address Specification These bits specify the address of HIFRAM to be accessed by an external device, with 32-bit boundary. 1, 0 -- All 0 R Reserved These bits are always read as 0. The write value should always be 0. Note: * This bit can be only written to by an external device when the HIFRS pin is low. It cannot be written to by the on-chip CPU.
Rev. 6.00 Jul. 15, 2009 Page 524 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.4.8
HIF Data Register (HIFDATA)
HIFDATA is a 32-bit register used to hold data to be written to HIFRAM and data read from HIFRAM for external device accesses. If HIFDATA is not used when accessing HIFRAM, it can be used for data transfer between an external device connected to the HIF and the on-chip CPU. HIFDATA can be read from and written to by the on-chip CPU. Access to HIFDATA by an external device should be performed with HIFDATA specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit 31 to 0 Bit Name Initial Value R/W R/W Description 32-bit Data
D31 to D0 All 0
17.4.9
HIF Boot Control Register (HIFBCR)
HIFBCR is a 32-bit register for exclusive control of an external device and the on-chip CPU regarding access of HIFRAM. HIFBCR can be only read by the on-chip CPU. Access to HIFBCR by an external device should be performed with HIFBCR specified by bits REG5 to REG0 in HIFIDX and the HIFRS pin low.
Bit 31 to 8 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 to 1 -- All 0 R/W AC-Bit Writing Assistance These bits should be used to write the bit pattern (H'A5) needed to set the AC bit to 1. These bits are always read as 0.
Rev. 6.00 Jul. 15, 2009 Page 525 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 0
Bit Name AC
Initial Value 0/1
R/W R/W
Description HIFRAM Access Exclusive Control Controls accessing of HIFRAM by the on-chip CPU for the HIFRAM bank selected by the BMD and BSEL bits in HIFSCR as the bank allowed to be accessed by this LSI. 0: The on-chip CPU can perform reading/writing of HIFRAM. 1: When an HIFRAM read/write operation by the on-chip CPU occurs, the CPU enters the wait state, and execution of the instruction is halted until this bit is cleared to 0. When booted in non-HIF boot mode, the initial value of this bit is 0. When booted in HIF boot mode, the initial value of this bit is 1. After an external device writes a boot program to HIFRAM via the HIF, clearing this bit to 0 boots the onchip CPU from HIFRAM. When 1 is written to this bit by an external device, H'A5 should be written to bits 7 to 0 to prevent erroneous writing.
17.4.10 HIFDREQ Trigger Register (HIFDTR) HIFDTR is a 32-bit register. Writing to HIFDTR by the on-chip CPU asserts the HIFDREQ pin. HIFDTR cannot be accessed by an external device.
Bit 31 to 1 Bit Name -- Initial Value All 0 R/W R*
1
Description Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 526 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 0
Bit Name DTRG
Initial Value 0
R/W R/W* *
1 2
Description HIFDREQ Trigger When 1 is written to this bit, the HIFDREQ pin is asserted according to the setting of the DMD and DPOL bits in HIFSCR. This bit is automatically cleared to 0 in synchronization with negate of the HIFDREQ pin. Though this bit can be set to 1 by the on-chip CPU, it cannot be cleared to 0. To avoid conflict between clearing of this bit by negate of the HIFDREQ pin and setting of this bit by the onchip CPU, make sure this bit is cleared to 0 before setting this bit to 1 by the on-chip CPU.
Notes: 1. This bit cannot be accessed by an external device. It can be accessed only by the onchip CPU. 2. Writing 0 to this bit by the on-chip CPU is ignored.
17.4.11 HIF Bank Interrupt Control Register (HIFBICR) HIFBICR is a 32-bit register that controls HIF bank interrupts. HIFBICR cannot be accessed by an external device.
Bit 31 to 2 Bit Name -- Initial Value All 0 R/W R*
1
Description Reserved These bits are always read as 0. The write value should always be 0.
1
BIE
0
R/W*1
Bank Interrupt Enable Enables or disables a bank interrupt request (HIFBI) issued to the on-chip CPU. 0: HIFBI disabled 1: HIFBI enabled
Rev. 6.00 Jul. 15, 2009 Page 527 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Bit 0
Bit Name BIF
Initial Value 0
R/W R/W* *
1 2
Description Bank Interrupt Request Flag While this bit is 1, a bank interrupt request (HIFBI) is issued to the on-chip CPU according to the setting of the BIE bit. In auto-increment mode (AI/AD bit in HIFMCR is 0), this bit is automatically set to 1 when an external device has completed access to the 32-bit data in the end address of HIFRAM and the HIFCS pin has been negated. In auto-decrement mode (AI/AD bit in HIFMCR is 1), this bit is automatically set to 1 when an external device has completed access to the 32-bit data in the start address of HIFRAM and the HIFCS pin has been negated. Though this bit can be cleared to 0 by the on-chip CPU, it cannot be set to 1. Make sure setting of this bit by HIFRAM access from an external device and clearing of this bit by the onchip CPU do not conflict using software.
Notes: 1. This bit cannot be accessed by an external device. It can only be accessed by the onchip CPU. 2. Writing 1 to this bit by the on-chip CPU is ignored.
Rev. 6.00 Jul. 15, 2009 Page 528 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.5
Memory Map
Table 17.3 shows the memory map of HIFRAM. Table 17.3 Memory Map
Classification Map from external device*
1
Start Address H'0000 H'F84E0000
End Address H'03FF H'F84E03FF
Memory Size 1 kbyte 1 kbyte
Map from on-chip CPU*1 *2
Notes: 1. Map for a single HIFRAM bank. Which bank is to be accessed by an external device or the on-chip CPU depends on the BMD and BSEL bits in HIFSCR. The mapping addresses are common between the banks. 2. Note that in HIF boot mode, bank 0 is selected, and the first 1 kbyte in each of the following address ranges are also mapped: H'00000000 to H'01FFFFFF (first-half 32 Mbytes of area 0 in the P0 area), H'20000000 to H'21FFFFFF (first-half 32 Mbytes of area 0 in the P0 area), H'40000000 to H'41FFFFFF (first-half 32 Mbytes of area 0 in the P0 area), H'60000000 to H'61FFFFFF (first-half 32 Mbytes of area 0 in the P0 area), H'80000000 to H'81FFFFFF (first-half 32 Mbytes of area 0 in the P1 area), H'A0000000 to H'A1FFFFFF (first-half 32 Mbytes of area 0 in the P2 area), and H'C0000000 to H'C1FFFFFF (first-half 32 Mbytes of area 0 in the P3 area). If an external device modifies HIFRAM when HIFRAM is accessed from the P0, P1, or P3 area with the cache enabled, coherency may not be ensured. When the cache is enabled, accessing HIFRAM from the P2 area is recommended. In HIF boot mode, among the first-half 32 Mbytes of each area 0, access to the areas to which HIFRAM is not mapped is inhibited. Even in HIF boot mode, the second-half 32 Mbytes of area 0, area 3, area 4, area 5B, area 5, area 6B, and area 6 are mapped to the external memory as normally.
Rev. 6.00 Jul. 15, 2009 Page 529 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.6
Interface (Basic)
Figure 17.3 shows the basic read/write sequence. HIF read is defined by the overlap period of the HIFRD low-level period and HIFCS low-level period, and HIF write is defined by the overlap period of the HIFWR low-level period and HIFCS low-level period. The HIFRS signal indicates whether this is normal access or index/status register access; low level indicates normal access and high level indicates index/status register access.
Write cycle HIFCS HIFRS HIFRD HIFWR HIFD15 to HIFD00 WT_D RD_D Read cycle
Figure 17.3 Basic Timing for HIF Interface
Rev. 6.00 Jul. 15, 2009 Page 530 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.7
17.7.1
Interface (Details)
HIFIDX Write/HIFGSR Read
Writing of HIFIDX and reading of HIFGSR are shown in figure 17.4.
HIFIDX write cycle HIFGSR read cycle
HIFCS HIFRS HIFRD HIFWR HIFD15 to HIFD00 WT_D RD_D
Figure 17.4 HIFIDX Write and HIFGSR Read 17.7.2 Reading/Writing of HIF Registers other than HIFIDX and HIFGSR
As shown in figure 17.5, in reading and writing of HIF internal registers other than HIFIDX and HIFGSR, first HIFRS is held high and HIFIDX is written to in order to select the register to be accessed and the byte location. Then HIFRS is held low, and reading or writing of the register selected by HIFIDX is performed.
Index write Register write Register read
HIFCS HIFRS HIFRD HIFWR HIFD15 to HIFD00
HIFIDX
WT_D
RD_D
Register selection
Figure 17.5 HIF Register Settings
Rev. 6.00 Jul. 15, 2009 Page 531 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.7.3
Consecutive Data Writing to HIFRAM by External Device
Figure 17.6 shows the timing chart for consecutive data transfer from an external device to HIFRAM. As shown in this timing chart, by setting the start address and the data to be written first, consecutive data transfer can subsequently be performed.
HIFCS HIFRS HIFRD HIFWR HIFD15 to HIFD00
0016 AHAL 0018 D0D1 001A D2D3 000A 00A0 0018 D4D5 D6D7 D8D9
High level
HIFADR setting [15:8] = AH [7:0] = AL
Data for first write operation set in HIFDATA [31:24] = D0, [23:16] = D1, [15:8] = D2, [7:0] = D3
HIFMCR setting HIFDATA Consecutive data writing Consecutive write selection Auto-increment
Figure 17.6 Consecutive Data Writing to HIFRAM 17.7.4 Consecutive Data Reading from HIFRAM to External Device
Figure 17.7 shows the timing chart for consecutive data reading from HIFRAM to an external device. As this timing chart indicates, by setting the start address, data can subsequently be read out consecutively.
Rev. 6.00 Jul. 15, 2009 Page 532 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
HIFCS HIFRS HIFRD HIFWR HIFD15 to HIFD00
0016 AHAL 000A 0088 0018 D0D1 D2D3 D4D5 D6D7 D8D9 DADB DCDD
HIFADR setting HIFMCR setting HIFDATA [15:8] = AH Consecutive read selection [7:0] = AL Auto-increment
Consecutive data reading
Figure 17.7 Consecutive Data Reading from HIFRAM
17.8
External DMAC Interface
Figures 17.8 to 17.11 show the HIFDREQ output timing. The start of the HIFDREQ assert synchronizes with the DTRG bit in HIFDTR being set to 1. The HIFDREQ negate timing and assert level are determined by the DMD and DPOL bits in HIFSCR, respectively. When the external DMAC is specified to detect low level of the HIFDREQ signal, set DMD = 0 and DPOL = 0. After writing 1 to the DTRG bit, the HIFDREQ signal remains low until low level is detected for both the HIFCS and HIFRS signals. In this case, when the HIFDREQ signal is used, make sure that the setup time (HIFCS assertion to HIFRS settling) and the hold time (HIFRS hold to HIFCS negate) are satisfied. If tHIFAS and tHIFAH stipulated in section 25.4.11, HIF Timing, are not satisfied, the HIFDREQ signal may be negated unintentionally.
Rev. 6.00 Jul. 15, 2009 Page 533 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
DTRG bit DPOL bit Asserted in synchronization with the DTRG bit being set by the on-chip CPU. HIFDREQ The DTRG bit is cleared simultaneously with HIFDREQ negate.
Negated when HIFCS = HIFRS = low level. Latency is tPCYC (peripheral clock cycle) x 3 cyc or less. HIFCS HIFRS
Figure 17.8 HIFDREQ Timing (When DMD = 0 and DPOL = 0) When the external DMAC is specified to detect high level of the HIFDREQ signal, set DMD = 0 and DPOL = 1. At the time the DPOL bit is set to 1, HIFDREQ becomes low. Then after writing 1 to the DTRG bit, HIFDREQ remains high until low level is detected for both the HIFCS and HIFRS signals. In this case, when the HIFDREQ signal is used, make sure that the setup time (HIFCS assertion to HIFRS settling) and the hold time (HIFRS hold to HIFCS negate) are satisfied. If tHIFAS and tHIFAH stipulated in section 25.4.11, HIF Timing, are not satisfied, the HIFDREQ signal may be negated unintentionally.
DTRG bit DPOL bit
Negated in synchronization with the DPOL bit being set by the on-chip CPU. Asserted in synchronization with the DTRG bit being set by the on-chip CPU. The DTRG bit is cleared simultaneously with HIFDREQ negate.
HIFDREQ
Negated when HIFCS = HIFRS = low level. Latency is tPCYC (peripheral clock cycle) x 3 cyc or less.
HIFCS HIFRS
Figure 17.9 HIFDREQ Timing (When DMD = 0 and DPOL = 1)
Rev. 6.00 Jul. 15, 2009 Page 534 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
When the external DMAC is specified to detect the falling edge of the HIFDREQ signal, set DMD = 1 and DPOL = 0. After writing 1 to the DTRG bit, a low pulse of 32 peripheral clock cycles is generated at the HIFDREQ pin.
DTRG bit DPOL bit
Asserted in synchronization with the DTRG bit being set by the on-chip CPU. The DTRG bit is cleared simultaneously with HIFDREQ negate. After assert, negated when tPCYC (peripheral clock cycle) x 32 cyc have elapsed.
HIFDREQ
Figure 17.10 HIFDREQ Timing (When DMD = 1 and DPOL = 0) When the external DMAC is specified to detect the rising edge of the HIFDREQ signal, set DMD = 1 and DPOL = 1. At the time the DPOL bit is set to 1, HIFDREQ becomes low. Then after writing 1 to the DTRG bit, a low pulse of 32 peripheral clock cycles is generated at the HIFDREQ pin.
DTRG bit DPOL bit
Negated in synchronization with the DPOL bit being set by the on-chip CPU. Asserted in synchronization with the DTRG bit being set by the on-chip CPU. The DTRG bit is cleared simultaneously with HIFDREQ negate.
HIFDREQ
After assert, negated when tPCYC (peripheral clock cycle) x 32 cyc have elapsed.
Figure 17.11 HIFDREQ Timing (When DMD = 1 and DPOL = 1) When the external DMAC supports intermittent operating mode (block transfer mode), efficient data transfer can be implemented by using the HIFRAM consecutive access and bank functions.
Rev. 6.00 Jul. 15, 2009 Page 535 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Table 17.4 Consecutive Write Procedure to HIFRAM by External DMAC
External Device No. 1 2 3 CPU HIF initial setting DMAC initial setting Set HIFADR to HIFRAM end address -8 Select HIFDATA and write dummy data (4 bytes) to HIFDATA Set HIFRAM consecutive write with address increment in HIFMCR Select HIFDATA and write dummy data (4 bytes) to HIFDATA HIF bank interrupt occurs HIFRAM bank switching by HIF bank interrupt handler (external device accesses bank 1 and onchip CPU accesses bank 0) Set DTRG bit to 1 DMAC HIF This LSI CPU HIF initial setting
4
5
6
7 8
Activate DMAC Consecutive data write to bank 1 in HIFRAM
Assert HIFDREQ
9
Write to end HIF bank address of bank interrupt 1 in HIFRAM occurs completes and operation halts Re-activate DMAC Consecutive data write to bank 0 in HIFRAM Assert HIFDREQ
HIFRAM bank switching by HIF bank interrupt handler (external device accesses bank 0 and onchip CPU accesses bank 1) Set DTRG bit to 1 Read data from bank 1 in HIFRAM
10 11
Rev. 6.00 Jul. 15, 2009 Page 536 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
External Device No. 12 CPU DMAC HIF Write to end HIF bank address of bank interrupt 0 in HIFRAM occurs completes and operation halts Re-activate DMAC Assert HIFDREQ
This LSI CPU HIFRAM bank switching by HIF bank interrupt handler (external device accesses bank 1 and onchip CPU accesses bank 0) Set DTRG bit to 1
13
Hereafter No. 11 to 13 are repeated. When a register other than HIFDATA is accessed (except that HIFGSR read with HIFRS = low), HIFRAM consecutive write is interrupted, and No. 3 to 6 need to be done again.
Table 17.5 Consecutive Read Procedure from HIFRAM by External DMAC
External Device No. 1 2 3 CPU HIF initial setting DMAC initial setting Set HIFADR to HIFRAM start address Set HIFRAM consecutive read with address increment in HIFMCR Select HIFDATA Write data to bank 1 in HIFRAM After writing data to end address of bank 1 in HIFRAM, perform HIFRAM bank switching (external device accesses bank 1 and onchip CPU accesses bank 0) Activate DMAC Assert HIFDREQ Set DTRG bit to 1 DMAC HIF This LSI CPU HIF initial setting
4
5 6 7
8
Rev. 6.00 Jul. 15, 2009 Page 537 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
External Device No. 9 CPU DMAC Consecutive data read from bank 1 in HIFRAM Read from end HIF bank address of bank interrupt 1 in HIFRAM occurs completes and operation halts Re-activate DMAC Consecutive data read from bank 0 in HIFRAM Read from end HIF bank address of bank interrupt 0 in HIFRAM occurs completes and operation halts Re-activate DMAC Assert HIFDREQ Assert HIFDREQ HIF
This LSI CPU Write data to bank 0 in HIFRAM
10
HIFRAM bank switching by HIF bank interrupt handler (external device accesses bank 0 and onchip CPU accesses bank 1) Set DTRG bit to 1 Write data to bank 1 in HIFRAM
11 12
13
HIFRAM bank switching by HIF bank interrupt handler (external device accesses bank 1 and onchip CPU accesses bank 0) Set DTRG bit to 1
14
Hereafter No. 12 to 14 are repeated. When a register other than HIFDATA is accessed (except that HIFGSR read with HIFRS = low), HIFRAM consecutive read is interrupted, and No. 3 to 5 need to be done again.
Rev. 6.00 Jul. 15, 2009 Page 538 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.9
Alignment Control
Tables 17.6 and 17.7 show the alignment control when an external device accesses the HIFDATA register, and the HIF registers other than the HIFDATA register, respectively. Table 17.6 HIFDATA Register Alignment for Access by an External Device
Data in HIFDATA WBSWP Bit H'76543210 0 BO Bit 0 BYTE[1:0] Bits B'00 B'10 1 B'00 B'10 1 0 B'00 B'10 1 B'00 B'10 Alignment in HIFD[15:0] Pins H'7654 H'3210 H'3210 H'7654 H'1032 H'5476 H'5476 H'1032
Table 17.7 HIF Registers (other than HIFDATA) Alignment for Access by an External Device
Data in HIFDATA WBSWP Bit H'76543210 Don't care BO Bit 0 BYTE[1:0] Bits B'00 B'10 1 B'00 B'10 Alignment in HIFD[15:0] Pins H'7654 H'3210 H'3210 H'7654
Rev. 6.00 Jul. 15, 2009 Page 539 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
17.10
Interface When External Device Power is Cut Off
When the power supply of an external device interfacing with the HIF is cut off, intermediate levels may be applied to the HIF input pins or the HIF output pins may drive an external device not powered, thus causing the device to be damaged. The HIFEBL pin is provided to prevent this from happening. The system power monitor block controls the HIFEBL pin in synchronization with the cutoff of the external device power so that all HIF pins can be set to the high-impedance state. Figure 17.12 shows an image of high-impedance control of the HIF pins. Table 17.8 lists the input/output control for the HIF pins.
HIFD15 to HIFD00 HIFCS HIFRS HIFWR HIFRD HIFMD
HIFINT HIFDREQ HIFRDY
HIFEBL
Figure 17.12 Image of High-Impedance Control of HIF Pins by HIFEBL Pin
Rev. 6.00 Jul. 15, 2009 Page 540 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
Table 17.8 Input/Output Control for HIF Pins
LSI Status HIFMD input level Reset State by RES Pin Low (Non-boot setting) The HIFEBL pin is a general input port and the HIF is not controlled by the signal input on this pin. General input port Reset Canceled by RES Pin High (After the reset canceled by boot setting) Low (After the reset canceled by non-boot setting)
High (Boot setting)
HIFEBL input level HIFRDY output control
Low Output buffer: On (Low output) Output buffer: Off
High Output buffer: On (Low output) Output buffer: Off Output buffer: Off I/O buffer: Off
Low Output buffer: Off
High Output buffer: On (Sequence output) Output buffer: On (Sequence output) Output buffer: On (Sequence output)
General input port at the 1 initial state * General input port at the 2 initial state*
HIFINT output control
General input port
Output buffer: Off Output buffer: Off I/O buffer: Off
General input port at the 2 initial state*
HIFDREQ Output buffer: output Off control HIFD 15 to HIFD0 I/O control I/O buffer: Off
General input port
General input port at the 2 initial state*
General input port
General input port at the I/O buffer 2 initial state* controlled according to states of HIFCS, HIFWR, and HIFRD
HIFCS input control HIFRS input control
Input buffer: Off Input buffer: Off
Input buffer: Off Input buffer: Off
General input port
Input buffer: Input buffer: General input port at the 2 Off On initial state* Input buffer: Input buffer: General input port at the 2 Off On initial state*
General input port
Rev. 6.00 Jul. 15, 2009 Page 541 of 816 REJ09B0237-0600
Section 17 Host Interface (HIF)
LSI Status HIFMD input level
Reset State by RES Pin
Reset Canceled by RES Pin High (After the reset canceled by boot setting) Low (After the reset canceled by non-boot setting)
High (Boot setting)
Low (Non-boot setting) The HIFEBL pin is a general input port and the HIF is not controlled by the signal input on this pin. General input port
HIFEBL input level HIFWR input control HIFRD input control
Low Input buffer: Off Input buffer: Off
High Input buffer: Off Input buffer: Off
Low Input buffer: Off Input buffer: Off
High Input buffer: On Input buffer: On
General input port at the initial 1 state * General input port at the initial 2 state*
General input port
General input port at the initial 2 state*
Notes: 1. The pin also functions as an HIFEBL pin by setting the PFC registers. 2. The pin also functions as an HIF pin by setting the PFC registers. When the HIF pin function is selected for the HIFEBL pin and this pin by setting the PFC registers, the input and/or output buffers are controlled according to the HIFEBL pin state. When the HIF pin function is not selected for the HIFEBL pin and is selected for this pin by setting the PFC registers, the input and/or output buffers are always turned off. This setting is prohibited.
Rev. 6.00 Jul. 15, 2009 Page 542 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Section 18 Pin Function Controller (PFC)
The pin function controller (PFC) consists of registers that select multiplexed pin functions and input/output directions. Tables 18.1 to 18.5 show the multiplexed pins in this LSI. Table 18.6 shows the pin functions in each operating mode. Table 18.1 List of Multiplexed Pins (Port A)
Port A Function 1 (Related Module) Function 2 (Related Module) Function 3 (Related Module) SCK_SIO0 input/output (SIOF) Function 4 (Related Module)
PA16 input/output (port) A16 output (BSC) PA17 input/output (port) A17 output (BSC) PA18 input/output (port) A18 output (BSC) PA19 input/output (port) A19 output (BSC) PA20 input/output (port) A20 output (BSC) PA21 input/output (port) A21 output (BSC) PA22 input/output (port) A22 output (BSC) PA23 input/output (port) A23 output (BSC) PA24 input/output (port) A24 output (BSC) PA25 input/output (port) A25 output (BSC)
SIOMCLK0 input (SIOF) RXD_SIO0 input (SIOF) TXD_SIO0 output (SIOF) SIOFSYNC0 input/output (SIOF)
Table 18.2 List of Multiplexed Pins (Port B)
Function 1 (Related Module) PB00 input/output (port) PB01 input/output (port) PB02 input/output (port) CKE output (BSC) Function 2 (Related Module) WAIT input (BSC) IOIS16 input (BSC) Function 3 (Related Module) Function 4 (Related Module)
Port B

Rev. 6.00 Jul. 15, 2009 Page 543 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Port B
Function 1 (Related Module) PB03 input/output (port) PB04 input/output (port) PB05 input/output (port) PB06 input/output (port) PB07 input/output (port) PB08 input/output (port) PB09 input/output (port) PB10 input/output (port) PB11 input/output (port) PB12 input/output (port) PB13 input/output (port)
Function 2 (Related Module) CAS output (BSC) RAS output (BSC) WE2(BE2) output (BSC) WE3(BE3) output (BSC) DQMUL output (BSC) ICIORD output (BSC)
Function 3 (Related Module)
Function 4 (Related Module)

DQMUU output ICIOWR output (BSC) (BSC) CE2B output (BSC)
CS6B output (BSC)
CE1B output (BSC) CE2A output (BSC)

CS5B output (BSC) CS4 output (BSC) CS3 output (BSC) BS output (BSC)
CE1A output (BSC)


Rev. 6.00 Jul. 15, 2009 Page 544 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Table 18.3 List of Multiplexed Pins (Port C)
Port C Function 1 (Related Module) Function 2 (Related Module) Function 3 (Related Module) Function 4 (Related Module) SPEED100 output (PHY) LINK output (PHY) CRS output (PHY) DUPLEX output (PHY)
PC00 input/output (port) MII_RXD0 input (EtherC) PC01 input/output (port) MII_RXD1 input (EtherC) PC02 input/output (port) MII_RXD2 input (EtherC) PC03 input/output (port) MII_RXD3 input (EtherC) PC04 input/output (port) MII_TXD0 output (EtherC) PC05 input/output (port) MII_TXD1 output (EtherC) PC06 input/output (port) MII_TXD2 output (EtherC) PC07 input/output (port) MII_TXD3 output (EtherC) PC08 input/output (port) RX_DV input (EtherC) PC09 input/output (port) RX_ER input (EtherC) PC10 input/output (port) RX_CLK input (EtherC) PC11 input/output (port) TX_ER output (EtherC) PC12 input/output (port) TX_EN output (EtherC) PC13 input/output (port) TX_CLK input (EtherC) PC14 input/output (port) COL input (EtherC) PC15 input/output (port) CRS input (EtherC) PC16 input/output (port) MDIO input/output (EtherC) PC17 input/output (port) MDC output (EtherC) PC18 input/output (port) LNKSTA input (EtherC) PC19 input/output (port) EXOUT output (EtherC) PC20 input/output (port) WOL output (EtherC)
Rev. 6.00 Jul. 15, 2009 Page 545 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Table 18.4 List of Multiplexed Pins (Port D)
Port D Function 1 (Related Module) PD0 input/output (port) PD1 input/output (port) PD2 input/output (port) PD3 input/output (port) PD4 input/output (port) PD5 input/output (port) PD6 input/output (port) PD7 input/output (port) Function 2 (Related Module) IRQ0 input (INTC) IRQ1 input (INTC) IRQ2 input (INTC) IRQ3 input (INTC) IRQ4 input (INTC) IRQ5 input (INTC) IRQ6 input (INTC) IRQ7 input (INTC) Function 3 (Related Module) TxD1 output (SCIF) RxD1 input (SCIF) Function 4 (Related Module) TEND0 output (DMAC) TEND1 output (DMAC) DREQ0 input (DMAC) DACK0 output (DMAC)
SCK1 input/output (SCIF) TxD2 output (SCIF) RxD2 input (SCIF) DREQ1 input (DMAC) DACK1 output (DMAC)
SCK2 input/output (SCIF)
Table 18.5 List of Multiplexed Pins (Port E)
Port
E
Function 1 (Related Module)
Function 2 (Related Module)
Function 3 (Related Module)
SCK_SIO0 input/output (SIOF) SIOMCLK0 input (SIOF) RXD_SIO0 input (SIOF)
Function 4 (Related Module)

PE00 input/output (port) HIFEBL input (HIF) PE01 input/output (port) HIFRDY output (HIF) PE02 input/output (port) HIFDREQ output (HIF) PE03 input/output (port) HIFMD input (HIF) PE04 input/output (port) HIFINT output (HIF) PE05 input/output (port) HIFRD input (HIF) PE06 input/output (port) HIFWR input (HIF) PE07 input/output (port) HIFRS input (HIF) PE08 input/output (port) HIFCS input (HIF)
TXD_SIO0 output (SIOF) SIOSYNC0 input/output (SIOF) D16 input/output (BSC) D17 input/output (BSC) D18 input/output (BSC) D19 input/output (BSC)
PE09 input/output (port) HIFD00 input/output (HIF) PE10 input/output (port) HIFD01 input/output (HIF) PE11 input/output (port) HIFD02 input/output (HIF) PE12 input/output (port) HIFD03 input/output (HIF)
Rev. 6.00 Jul. 15, 2009 Page 546 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Port
E
Function 1 (Related Module)
Function 2 (Related Module)
Function 3 (Related Module)
Function 4 (Related Module)
D20 input/output (BSC) D21 input/output (BSC) D22 input/output (BSC) D23 input/output (BSC)
PE13 input/output (port) HIFD04 input/output (HIF) PE14 input/output (port) HIFD05 input/output (HIF) PE15 input/output (port) HIFD06 input/output (HIF) TxD0 output (SCIF) PE16 input/output (port) HIFD07 input/output (HIF) RxD0 input (SCIF)
PE17 input/output (port) HIFD08 input/output (HIF) SCK0 input/output (SCIF) D24 input/output (BSC) PE18 input/output (port) HIFD09 input/output (HIF) TxD1 output (SCIF) PE19 input/output (port) HIFD10 input/output (HIF) RxD1 input (SCIF) D25 input/output (BSC) D26 input/output (BSC)
PE20 input/output (port) HIFD11 input/output (HIF) SCK1 input/output (SCIF) D27 input/output (BSC) PE21 input/output (port) HIFD12 input/output (HIF) RTS0 output (SCIF) PE22 input/output (port) HIFD13 input/output (HIF) CTS0 input (SCIF) PE23 input/output (port) HIFD14 input/output (HIF) RTS1 output (SCIF) PE24 input/output (port) HIFD15 input/output (HIF) CTS1 input (SCIF) D28 input/output (BSC) D29 input/output (BSC) D30 input/output (BSC) D31 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 547 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Table 18.6 Pin Functions in Each Operating Mode
Pin No. C13 A14 B13 A13 C12 B12 D11 A12 C11 B11 D10 A11 C10 A10 D9 B10 A5 B5 A4 D5 B4 C4 A3 D4 B3 A2 B8 D6 C15 Not HIF Boot Mode Initial Function A00 A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11 A12 A13 A14 A15 PA16 PA17 PA18 PA19 PA20 PA21 PA22 PA23 PA24 PA25 PB00 PB01 PB02 HIF Boot Mode Function Settable by PFC Initial Function PA16/A16 PA17/A17 PA18/A18 PA19/A19 PA20/A20 PA21/A21/SCK_SIO0 PA22/A22/SIOMCLK0 PA23/A23/RXD_SIO0 PA24/A24/TXD_SIO0 PA25/A25/SIOFSYNC0 PB00/WAIT PB01/IOIS16 PB02/CKE A00 A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11 A12 A13 A14 A15 PA16 PA17 PA18 PA19 PA20 PA21 PA22 PA23 PA24 PA25 PB00 PB01 PB02 Function Settable by PFC PA16/A16 PA17/A17 PA18/A18 PA19/A19 PA20/A20 PA21/A21/SCK_SIO0 PA22/A22/SIOMCLK0 PA23/A23/RXD_SIO0 PA24/A24/TXD_SIO0 PA25/A25/SIOFSYNC0 PB00/WAIT PB01/IOIS16 PB02/CKE
Rev. 6.00 Jul. 15, 2009 Page 548 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Pin No. D12 C14 D15 D14 D7 C7 A8 D13 B6 C5 A6 C6 C8 A15 D8 C9 R6 M7 P6 N7 P8 M9 R9 N9 N6 M6 R8 N8
Not HIF Boot Mode Initial Function PB03 PB04 (WE0/DQMLL) (WE1/DQMLU/WE) PB05 PB06 RD RDWR PB07 PB08 PB09 PB10 PB11 PB12 CS0 PB13 PC00 PC01 PC02 PC03 PC04 PC05 PC06 PC07 PC08 PC09 PC10 PC11
HIF Boot Mode Function Settable by PFC Initial Function PB03/CAS PB04/RAS PB05/WE2(BE2)/DQMUL/ ICIORD PB03 PB04 (WE0/DQMLL) (WE1/DQMLU/WE) PB05 Function Settable by PFC PB03/CAS PB04/RAS PB05/WE2(BE2)/DQMUL/ ICIORD PB06/WE3(BE3)/DQMUU/ ICIOWR PB07/CE2B PB08/(CS6B/CE1B) PB09/CE2A PB10/(CS5B/CE1A) PB11/CS4 PB12/CS3 PB13/BS PC00/MII_RXD0 PC01/MII_RXD1 PC02/MII_RXD2 PC03/MII_RXD3 PC04/MII_TXD0/ SPEED100 PC05/MII_TXD1/LINK PC06/MII_TXD2/CRS PC07/MII_TXD3/DUPLEX PC08/RX_DV PC09/RX_ER PC10/RX_CLK PC11/TX_ER
PB06/WE3(BE3)/DQMUU/ PB06 ICIOWR PB07/CE2B PB08/(CS6B/CE1B) PB09/CE2A PB10/(CS5B/CE1A) PB11/CS4 PB12/CS3 PB13/BS PC00/MII_RXD0 PC01/MII_RXD1 PC02/MII_RXD2 PC03/MII_RXD3 PC04/MII_TXD0/ SPEED100 PC05/MII_TXD1/LINK PC06/MII_TXD2/CRS PC07/MII_TXD3/DUPLEX PC08/RX_DV PC09/RX_ER PC10/RX_CLK PC11/TX_ER RD RDWR PB07 PB08 PB09 PB10 PB11 PB12 CS0 PB13 PC00 PC01 PC02 PC03 PC04 PC05 PC06 PC07 PC08 PC09 PC10 PC11
Rev. 6.00 Jul. 15, 2009 Page 549 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Pin No. P9 M8 R10 P1 N2 M4 P2 N11 P10 D1 E4 D2 D3 C1 C2 C3 B2 N1 M3 M2 L4 M1 L2 L1 L3 E3 K3 K4 J2 J3
Not HIF Boot Mode Initial Function PC12 PC13 PC14 PC15 PC16 PC17 PC18 PC19 PC20 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PE00 PE01 PE02 HIFMD PE04 PE05 PE06 PE07 PE08 PE09 PE10 PE11 PE12
HIF Boot Mode Function Settable by PFC Initial Function PC12/TX_EN PC13/TX_CLK PC14/COL PC15/CRS PC16/MDIO PC17/MDC PC18/LNKSTA PC19/EXOUT PC20/WOL PD0/IRQ0/TEND0 PD1/IRQ1/TEND1 PD2/IRQ2/TxD1/DREQ0 PD3/IRQ3/RxD1/DACK0 PD4/IRQ4/SCK1 PD5/IRQ5/TxD2/DREQ1 PD6/IRQ6/RxD2/DACK1 PD7/IRQ7/SCK2 PE00/HIFEBL/SCK_SIO0 PC12 PC13 PC14 PC15 PC16 PC17 PC18 PC19 PC20 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 HIFEBL Function Settable by PFC PC12/TX_EN PC13/TX_CLK PC14/COL PC15/CRS PC16/MDIO PC17/MDC PC18/LNKSTA PC19/EXOUT PC20/WOL PD0/IRQ0/TEND0 PD1/IRQ1/TEND1 PD2/IRQ2/TxD1/DREQ0 PD3/IRQ3/RxD1DACK0 PD4/IRQ4/SCK1 PD5/IRQ5/TxD2/DREQ1 PD6/IRQ6/RxD2/DACK1 PD7/IRQ7/SCK2 PE00/HIFEBL/SCK_SIO0 PE01/HIFRDY/SIOMCLK0 PE02/HIFDREQ/ RXD_SIO0 PE03/HIFMD PE04/HIFINT/TXD_SIO0 PE05/HIFRD PE06/HIFWR/SIOFSYNC0 PE07/HIFRS PE08/HIFCS PE09/HIFD00/D16 PE10/HIFD01/D17 PE11/HIFD02/D18 PE12/HIFD03/D19
PE01/HIFRDY/SIOMCLK0 HIFRDY PE02/HIFDREQ/ RXD_SIO0 PE03/HIFMD PE04/HIFINT/TXD_SIO0 PE05/HIFRD HIFDREQ HIFMD HIFINT HIFRD
PE06/HIFWR/SIOFSYNC0 HIFWR PE07/HIFRS PE08/HIFCS PE09/HIFD00/D16 PE10/HIFD01/D17 PE11/HIFD02/D18 PE12/HIFD03/D19 HIFRS HIFCS HIFD00 HIFD01 HIFD02 HIFD03
Rev. 6.00 Jul. 15, 2009 Page 550 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Pin No. J1 J4 H2 H1 G2 G1 G3 F2 G4 F1 F3 F4 K14 J13 J15 H12 J14 H13 G12 G15 E15 E14 F14 F13 F15 F12 G14 G13 M14 N12
Not HIF Boot Mode Initial Function PE13 PE14 PE15 PE16 PE17 PE18 PE19 PE20 PE21 PE22 PE23 PE24 D00 D01 D02 D03 D04 D05 D06 D07 D08 D09 D10 D11 D12 D13 D14 D15 TRST input TDO output
HIF Boot Mode Function Settable by PFC Initial Function PE13/HIFD04/D20 PE14/HIFD05/D21 PE15/HIFD06/TxD0/D22 PE16/HIFD07/RxD0/D23 PE17/HIFD08/SCK0/D24 PE18/HIFD09/TxD1/D25 PE19/HIFD10/RxD1/D26 PE20/HIFD11/SCK1/D27 PE21/HIFD12/RTS0/D28 PE22/HIFD13/CTS0/D29 PE23/HIFD14/RTS1/D30 PE24/HIFD15/CTS1/D31 HIFD04 HIFD05 HIFD06 HIFD07 HIFD08 HIFD09 HIFD10 HIFD11 HIFD12 HIFD13 HIFD14 HIFD15 D00 D01 D02 D03 D04 D05 D06 D07 D08 D09 D10 D11 D12 D13 D14 D15 TRST input TDO output Function Settable by PFC PE13/HIFD04//D20 PE14/HIFD05/D21 PE15/HIFD06/TxD0/D22 PE16/HIFD07/RxD0/D23 PE17/HIFD08/SCK0/D24 PE18/HIFD09/TxD1/D25 PE19/HIFD10/RxD1/D26 PE20/HIFD11/SCK1/D27 PE21/HIFD12/RTS0/D28 PE22/HIFD13/CTS0/D29 PE23/HIFD14/RTS1/D30 PE24/HIFD15/CTS1/D31
Rev. 6.00 Jul. 15, 2009 Page 551 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Pin No. M12 M13 P12 R13 R14 K15 P11 L13 L14 R12 J12 L15 N13 M15 L12 M11 R11
Not HIF Boot Mode Initial Function TDI input TMS input TCK input EXTAL input XTAL output CKIO output CK_PHY input ASEMD input TESTMD input MD3 input MD2 input MD1 input MD0 input RES input NMI input MD5 input TESTOUT output
HIF Boot Mode Function Settable by PFC Initial Function TDI input TMS input TCK input EXTAL input XTAL output CKIO output CK_PHY input ASEMD input TESTMD input MD3 input MD2 input MD1 input MD0 input RES input NMI input MD5 input TESTOUT output Function Settable by PFC
Rev. 6.00 Jul. 15, 2009 Page 552 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.1
Register Descriptions
The PFC has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * * * * * * * * * * * * * * * * * * * Port A IO register H (PAIORH) Port A control register H1 (PACRH1) Port A control register H2 (PACRH2) Port B IO register L (PBIORL) Port B control register L1 (PBCRL1) Port B control register L2 (PBCRL2) Port C IO register H (PCIORH) Port C IO register L (PCIORL) Port C control register H2 (PCCRH2) Port C control register L1 (PCCRL1) Port C control register L2 (PCCRL2) Port D IO register L (PDIORL) Port D control register L2 (PDCRL2) Port E IO register H (PEIORH) Port E IO register L (PEIORL) Port E control register H1 (PECRH1) Port E control register H2 (PECRH2) Port E control register L1 (PECRL1) Port E control register L2 (PECRL2)
Rev. 6.00 Jul. 15, 2009 Page 553 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.1.1
Port A IO Register H (PAIORH)
PAIORH is a 16-bit readable/writable register that selects the input/output directions of the port A pins. Bits PA25IOR to PA16IOR correspond to pins PA25 to PA16 (the pin name abbreviations for multiplexed functions are omitted). PAIORH is enabled when a port A pin functions as a general input/output (PA25 to PA16), otherwise, disabled. Setting a bit in PAIORH to 1 makes the corresponding pin function as an output and clearing a bit in PAIORH to 0 makes the pin function as an input. Bits 15 to 10 in PAIORH are reserved. These bits are always read as 0. The write value should always be 0. The initial value of PAIORH is H'0000. 18.1.2 Port A Control Register H1 and H2 (PACRH1 and PACRH2)
PACRH1 and PACRH2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port A pins. * PACRH1
Bit 15 to 4 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 3 2 PA25MD1 PA25MD0 0 0 R/W R/W PA25 Mode Select the function of pin PA25/A25/SIOFSYNC0. 00: PA25 input/output (port) 01: A25 output (BSC) 10: SIOFSYNC0 input/output (SIOF) 11: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 554 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 1 0
Bit Name PA24MD1 PA24MD0
Initial Value 0 0
R/W R/W R/W
Description PA24 Mode Select the function of pin PA24/A24/TXD_SIO0. 00: PA24 input/output (port) 01: A24 output (BSC) 10: TXD_SIO0 output (BSC) 11: Setting prohibited
* PACRH2
Bit 15 14 Bit Name PA23MD1 PA23MD0 Initial Value 0 0 R/W R/W R/W Description PA23 Mode Select the function of pin PA23/A23/RXD_SIO0. 00: PA23 input/output (port) 01: A23 output (BSC) 10: RXD_SIO0 input (SIOF) 11: Setting prohibited 13 12 PA22MD1 PA22MD0 0 0 R/W R/W PA22 Mode Select the function of pin PA22/A22/SIOMCLK0. 00: PA22 input/output (port) 01: A22 output (BSC) 10: SIOMCLK0 input (SIOF) 11: Setting prohibited 11 10 PA21MD1 PA21MD0 0 0 R/W R/W PA21 Mode Select the function of pin PA21/A21/SCK_SIO0. 00: PA21 input/output (port) 01: A21 output (BSC) 10: SCK_SIO0 input/output (SIOF) 11: Setting prohibited 9 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 555 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 8
Bit Name PA20MD0
Initial Value 0
R/W R/W
Description PA20 Mode Selects the function of pin PA20/A20. 0: PA20 input/output (port) 1: A20 output (BSC)
7
0
R
Reserved This bit is always read as 0. The write value should always be 0.
6
PA19MD0
0
R/W
PA19 Mode Selects the function of pin PA19/A19. 0: PA19 input/output (port) 1: A19 output (BSC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PA18MD0
0
R/W
PA18 Mode Selects the function of pin PA18/A18. 0: PA18 input/output (port) 1: A18 output (BSC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PA17MD0
0
R/W
PA17 Mode Selects the function of pin PA17/A17. 0: PA17 input/output (port) 1: A17 output (BSC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PA16MD0
0
R/W
PA16 Mode Selects the function of pin PA16/A16. 0: PA16 input/output (port) 1: A16 output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 556 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.1.3
Port B IO Register L (PBIORL)
PBIORL is a 16-bit readable/writable register that selects the input/output directions of the port B pins. Bits PB13IOR to PB0IOR correspond to pins PB13 to PB00 (the pin name abbreviations for multiplexed functions are omitted). PBIORL is enabled when a port B pin functions as a general input/output (PB13 to PB00), otherwise, disabled. Setting a bit in PBIORL to 1 makes the corresponding pin function as an output and clearing a bit in PBIORL to 0 makes the pin function as an input. Bits 15 and 14 in PBIORL are reserved. These bits are always read as 0. The write value should always be 0. The initial value of PAIBRL is H'0000. 18.1.4 Port B Control Register L1 and L2 (PBCRL1 and PBCRL2)
PBCRL1 and PBCRL2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port B pins. * PBCRL1
Bit 15 to 11 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 10 PB13MD0 0 R/W PB13 Mode Selects the function of pin PB13/BS. 0: PB13 input/output (port) 1: BS output (BSC) 9 0 R Reserved This bit is always read as 0. The write value should always be 0. 8 PB12MD0 0 R/W PB12 Mode Selects the function of pin PB12/CS3. 0: PB12 input/output (port) 1: CS3 output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 557 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 7
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
6
PB11MD0
0
R/W
PB11 Mode Selects the function of pin PB11/CS4. 0: PB11 input/output (port) 1: CS4 output (BSC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PB10MD0
0
R/W
PB10 Mode Selects the function of pin PB10/CS5B/CE1A. 0: PB10 input/output (port) 1: CS5B/CE1A output (BSC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PB9MD0
0
R/W
PB9 Mode Selects the function of pin PB09/CE2A. 0: PB09 input/output (port) 1: CE2A output (BSC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PB8MD0
0
R/W
PB8 Mode Selects the function of pin PB08/CS6B/CE1B. 0: PB08 input/output (port) 1: CS6B/CE1B output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 558 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
* PBCRL2
Bit 15 Bit Name Initial Value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 14 PB7MD0 0 R/W PB7 Mode Selects the function of pin PB07/CE2B. 0: PB07 input/output (port) 1: CE2B output (BSC) 13 0 R Reserved This bit is always read as 0. The write value should always be 0. 12 PB6MD0 0 R/W PB6 Mode Selects the function of pin PB06/WE3(BE3)/DQMUU/ICIOWR. 0: PB06 input/output (port) 1: WE3(BE3)/DQMUU/ICIOWR output (BSC) 11 0 R Reserved This bit is always read as 0. The write value should always be 0. 10 PB5MD0 0 R/W PB5 Mode Selects the function of pin PB05/WE2(BE2)/DQMUL/ICIORD. 0: PB05 input/output (port) 1: WE2(BE2)/DQMUL/ICIORD output (BSC) 9 0 R Reserved This bit is always read as 0. The write value should always be 0. 8 PB4MD0 0 R/W PB4 Mode Selects the function of pin PB04/RAS. 0: PB04 input/output (port) 1: RAS output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 559 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 7
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
6
PB3MD0
0
R/W
PB3 Mode Selects the function of pin PB03/CAS. 0: PB03 input/output (port) 1: CAS output (BSC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PB2MD0
0
R/W
PB2 Mode Selects the function of pin PB02/CKE. 0: PB02 input/output (port) 1: CKE output (BSC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PB1MD0
0
R/W
PB1 Mode Selects the function of pin PB01/IOIS16. 0: PB01 input/output (port) 1: IOIS16 input (BSC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PB0MD0
0
R/W
PB0 Mode Selects the function of pin PB00/WAIT. 0: PB00 input/output (port) 1: WAIT input (BSC)
Rev. 6.00 Jul. 15, 2009 Page 560 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.1.5
Port C IO Register H and L (PCIORH and PCIORL)
PCIORH and PCIORL are 16-bit readable/writable registers that select the input/output directions of the port C pins. Bits PC20IOR to PC0IOR correspond to pins PC20 to PC00 (the pin name abbreviations for multiplexed functions are omitted). PCIORH is enabled when a port C pin functions as a general input/output (PC20 to PC16), otherwise, disabled. PCIORL is enabled when a port C pin functions as a general input/output (PC15 to PC00), otherwise, disabled. Setting a bit in PCIORH and PCIORL to 1 makes the corresponding pin function as an output and clearing a bit in PCIORH and PCIORL to 0 makes the pin function as an input. Bits 15 to 5 in PCIORH are reserved. These bits are always read as 0. The write value should always be 0. The initial values of PCIORH and PCIORL are H'0000. 18.1.6 Port C Control Register H2, L1, and L2 (PCCRH2, PCCRL1, and PCCRL2)
PCCRH2, PCCRL1, and PCCRL2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port C pins. * PCCRH2
Bit 15 to 9 Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 8 PC20MD0 0 R/W PC20 Mode Selects the function of pin PC20/WOL. 0: PC20 input/output (port) 1: WOL output (EtherC) 7 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 561 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 6
Bit Name PC19MD0
Initial Value 0
R/W R/W
Description PC19 Mode Selects the function of pin PC19/EXOUT. 0: PC19 input/output (port) 1: EXOUT output (EtherC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PC18MD0
0
R/W
PC18 Mode Selects the function of pin PC18/LNKSTA. 0: PC18 input/output (port) 1: LNKSTA input (EtherC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PC17MD0
0
R/W
PC17 Mode Selects the function of pin PC17/MDC. 0: PC17 input/output (port) 1: MDC output (EtherC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PC16MD0
0
R/W
PC16 Mode Selects the function of pin PC16/MDIO. 0: PC16 input/output (port) 1: MDIO input/output (EtherC)
Rev. 6.00 Jul. 15, 2009 Page 562 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
* PCCRL1
Bit 15 Bit Name Initial Value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 14 PC15MD0 0 R/W PC15 Mode Selects the function of pin PC15/CRS. 0: PC15 input/output (port) 1: CRS input (EtherC) 13 0 R Reserved This bit is always read as 0. The write value should always be 0. 12 PC14MD0 0 R/W PC14 Mode Selects the function of pin PC14/COL. 0: PC14 input/output (port) 1: COL input (EtherC) 11 0 R Reserved This bit is always read as 0. The write value should always be 0. 10 PC13MD0 0 R/W PC13 Mode Selects the function of pin PC13/TX_CLK. 0: PC13 input/output (port) 1: TX_CLK input (EtherC) 9 0 R Reserved This bit is always read as 0. The write value should always be 0. 8 PC12MD0 0 R/W PC12 Mode Selects the function of pin PC12/TX_EN. 0: PC12 input/output (port) 1: TX_EN output (EtherC)
Rev. 6.00 Jul. 15, 2009 Page 563 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 7
Bit Name
Initial Value 0
R/W R
Description Reserved This bit is always read as 0. The write value should always be 0.
6
PC11MD0
0
R/W
PC11 Mode Selects the function of pin PC11/TX_ER. 0: PC11 input/output (port) 1: TX_ER output (EtherC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PC10MD0
0
R/W
PC10 Mode Selects the function of pin PC10/RX_CLK. 0: PC10 input/output (port) 1: RX_CLK input (EtherC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PC9MD0
0
R/W
PC9 Mode Selects the function of pin PC09/RX_ER. 0: PC09 input/output (port) 1: RX_ER input (EtherC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PC8MD0
0
R/W
PC8 Mode Selects the function of pin PC08/RX_DV. 0: PC08 input/output (port) 1: RX_DV input (EtherC)
Rev. 6.00 Jul. 15, 2009 Page 564 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
* PCCRL2
Bit 15 14 Bit Name PC7MD1 PC7MD0 Initial Value 0 0 R/W R/W R/W Description PC7 Mode Select the function of pin PC7/MII_TXD3/DUPLEX. 00: PC07 input/output (port) 01: MII_TXD3 output (EtherC) 10: Setting prohibited 11: DUPLEX output (PHY) 13 12 PC6MD1 PC6MD0 0 0 R/W R/W PC6 Mode Select the function of pin PC6/MII_TXD2/CRS. 00: PC06 input/output (port) 01: MII_TXD2 output (EtherC) 10: Setting prohibited 11: CRS output (PHY) 11 10 PC5MD1 PC5MD0 0 0 R/W R/W PC5 Mode Select the function of pin PC5/MII_TXD1/LINK. 00: PC05 input/output (port) 01: MII_TXD1 output (EtherC) 10: Setting prohibited 11: LINK output (PHY) 9 8 PC4MD1 PC4MD0 0 0 R/W R/W PC4 Mode Select the function of pin PC4/MII_TXD0/SPEED100. 00: PC04 input/output (port) 01: MII_TXD0 output (EtherC) 10: Setting prohibited 11: SPEED100 output (PHY) 7 0 R Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 565 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 6
Bit Name PC3MD0
Initial Value 0
R/W R/W
Description PC3 Mode Selects the function of pin PC03/MII_RXD3. 0: PC03 input/output (port) 1: MII_RXD3 input (EtherC)
5
0
R
Reserved This bit is always read as 0. The write value should always be 0.
4
PC2MD0
0
R/W
PC2 Mode Selects the function of pin PC02/MII_RXD2. 0: PC02 input/output (port) 1: MII_RXD2 input (EtherC)
3
0
R
Reserved This bit is always read as 0. The write value should always be 0.
2
PC1MD0
0
R/W
PC1 Mode Selects the function of pin PC01/MII_RXD1. 0: PC01 input/output (port) 1: MII_RXD1 input (EtherC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PC0MD0
0
R/W
PC0 Mode Selects the function of pin PC00/MII_RXD0. 0: PC00 input/output (port) 1: MII_RXD0 input (EtherC)
18.1.7
Port D IO Register L (PDIORL)
PDIORL is a 16-bit readable/writable register that selects the input/output directions of the port D pins. Bits PD7IOR to PD0IOR correspond to pins PD7 to PD0 (the pin name abbreviations for multiplexed functions are omitted). PDIORL is enabled when a port C pin functions as a general input/output (PD7 to PD0), otherwise, disabled.
Rev. 6.00 Jul. 15, 2009 Page 566 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Setting a bit in PDIORL to 1 makes the corresponding pin function as an output and clearing a bit in PDIORL to 0 makes the pin function as an input. Bits 15 to 8 in PDIORL are reserved. These bits are always read as 0. The write value should always be 0. The initial value of PDIORL is H'0000. 18.1.8 Port D Control Register L2 (PDCRL2)
PDCRL2 is a 16-bit readable/writable register that selects the pin functions for the multiplexed port B pins. * PDCRL2
Bit 15 14 Bit Name PD7MD1 PD7MD0 Initial Value 0 0 R/W R/W R/W Description PD7 Mode Select the function of pin PD7/IRQ7/SCK2. 00: PD7 input/output (port) 01: IRQ7 input (INTC) 10: SCK2 input/output (SCIF) 11: Setting prohibited 13 12 PD6MD1 PD6MD0 0 0 R/W R/W PD6 Mode Select the function of pin PD6/IRQ6/RxD2/DACK1. 00: PD6 input/output (port) 01: IRQ6 input (INTC) 10: RxD2 input (SCIF) 11: DACK1 output (DMAC) 11 10 PD5MD1 PD5MD0 0 0 R/W R/W PD5 Mode Select the function of pin PD5/IRQ5/TxD2/DREQ1. 00: PD5 input/output (port) 01: IRQ5 input (INTC) 10: TxD2 output (SCIF) 11: DREQ1 input (DMAC)
Rev. 6.00 Jul. 15, 2009 Page 567 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 9 8
Bit Name PD4MD1 PD4MD0
Initial Value 0 0
R/W R/W R/W
Description PD4 Mode Select the function of pin PD4/IRQ4/SCK1. 00: PD4 input/output (port) 01: IRQ4 input (INTC) 10: SCK1 input/output (SCIF) 11: Setting prohibited
7 6
PD3MD1 PD3MD0
0 0
R/W R/W
PD3 Mode Select the function of pin PD3/IRQ3/RxD1/DACK0. 00: PD3 input/output (port) 01: IRQ3 input (INTC) 10: RxD1 input (SCIF) 11: DACK0 output (DMAC)
5 4
PD2MD1 PD2MD0
0 0
R/W R/W
PD2 Mode Select the function of pin PD2/IRQ2/TxD1/DREQ0. 00: PD2 input/output (port) 01: IRQ2 input (INTC) 10: TxD1 output (SCIF) 11: DREQ0 input (DMAC)
3 2
PD1MD1 PD1MD0
0 0
R/W R/W
PD1 Mode Select the function of pin PD1/IRQ1/TEND1. 00: PD1 input/output (port) 01: IRQ1 input (INTC) 10: Setting prohibited 11: TEND1 output (DMAC)
1 0
PD0MD1 PD0MD0
0 0
R/W R/W
PD0 Mode Select the function of pin PD0/IRQ0/TEND0. 00: PD0 input/output (port) 01: IRQ0 input (INTC) 10: Setting prohibited 11: TEND0 output (DMAC)
Rev. 6.00 Jul. 15, 2009 Page 568 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.1.9
Port E IO Register H and L (PEIORH and PEIORL)
PEIORH and PEIORL are 16-bit readable/writable registers that select the input/output directions of the port E pins. Bits PE24IOR to PE0IOR correspond to pins PE24 to PE00 (the pin name abbreviations for multiplexed functions are omitted). PEIORH is enabled when a port E pin functions as a general input/output (PE24 to PE16), otherwise, disabled. PEIORL is enabled when a port E pin functions as a general input/output (PE15 to PE00), otherwise, disabled. Setting a bit in PEIORH and PEIORL to 1 makes the corresponding pin function as an output and clearing a bit in PEIORH and PEIORL to 0 makes the pin function as an input. Bits 15 to 9 in PAIORH are reserved. These bits are always read as 0. The write value should always be 0. The initial values of PEIORH and PEIORL are H'0000. 18.1.10 Port E Control Register H1, H2, L1, and L2 (PECRH1, PECRH2, PECRL1, and PECRL2) PECRH1, PECRH2, PECRL1, and PECRL2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port E pins. * PECRH1
Bit 15 to 2 Bit Name Initial Value R/W All 0 R Description Reserved These bits are always read as 0. The write value should always be 0. 1 0 PE24MD1 PE24MD0 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode) R/W R/W PE24 Mode Select the function of pin PE24/HIFD15/CTS1/D31. 00: PE24 input/output (port) 01: HIFD15 input/output (HIF) 10: CTS1 input (SCIF) 11: D31 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 569 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
* PECRH2
Bit 15 14 Bit Name PE23MD1 PE23MD0 Initial Value 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode) 13 12 PE22MD1 PE22MD0 0 0 (When in nonHIF boot mode) 0 1 (When in HIF boot mode) 11 10 PE21MD1 PE21MD0 0 0 (When in nonHIF boot mode) 0 1 (When in HIF boot mode) R/W R/W PE21 Mode Select the function of pin PE21/HIFD12/RTS0/D28. 00: PE21 input/output (port) 01: HIFD12 input/output (HIF) 10: RTS0 output (SCIF) 11: D28 input/output (BSC) R/W R/W PE22 Mode Select the function of pin PE22/HIFD13/CTS0/D29. 00: PE22 input/output (port) 01: HIFD13 input/output (HIF) 10: CTS0 input (SCIF) 11: D29 input/output (BSC) R/W R/W R/W Description PE23 Mode Select the function of pin PE23/HIFD14/RTS1/D30. 00: PE23 input/output (port) 01: HIFD14 input/output (HIF) 10: RTS1 input (SCIF) 11: D30 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 570 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 9 8
Bit Name PE20MD1 PE20MD0
Initial Value R/W 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode) R/W R/W
Description PE20 Mode Select the function of pin PE20/HIFD11/SCK1/D27. 00: PE20 input/output (port) 01: HIFD11 input/output (HIF) 10: SCK1 input/output (SCIF) 11: D27 input/output (BSC)
7 6
PE19MD1 PE19MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE19 Mode Select the function of pin PE19/HIFD10/RxD1/D26. 00: PE19 input/output (port) 01: HIFD10 input/output (HIF) 10: RxD1 output (SCIF) 11: D26 input/output (BSC)
5 4
PE18MD1 PE18MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE18 Mode Select the function of pin PE18/HIFD09/TxD1/D25. 00: PE18 input/output (port) 01: HIFD09 input/output (HIF) 10: TxD1 output (SCIF) 11: D25 input/output (BSC)
3 2
PE17MD1 PE17MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE17 Mode Select the function of pin PE17/HIFD08/SCK0/D24. 00: PE17 input/output (port) 01: HIFD08 input/output (HIF) 10: SCK0 input/output (SCIF) 11: D24 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 571 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 1 0
Bit Name PE16MD1 PE16MD0
Initial Value 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W R/W
Description PE16 Mode Select the function of pin PE16/HIFD07/RxD0/D23. 00: PE16 input/output (port) 01: HIFD07 input/output (HIF) 10: RxD0 input (SCIF) 11: D23 input/output (BSC)
* PECRL1
Bit 15 14 Bit Name PE15MD1 PE15MD0 Initial Value 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode) 13 12 PE14MD1 PE14MD0 0 0 (When in nonHIF boot mode) 0 1 (When in HIF boot mode) R/W R/W PE14 Mode Select the function of pin PE14/HIFD05/D21. 00: PE14 input/output (port) 01: HIFD05 input/output (HIF) 10: Setting prohibited 11: D21 input/output (BSC) R/W R/W R/W Description PE15 Mode Select the function of pin PE15/HIFD06/TxD0/D22. 00: PE15 input/output (port) 01: HIFD06 input/output (HIF) 10: TxD0 output (SCIF) 11: D22 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 572 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 11 10
Bit Name PE13MD1 PE13MD0
Initial Value R/W 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode) R/W R/W
Description PE13 Mode Select the function of pin PE13/HIFD04/D20. 00: PE13 input/output (port) 01: HIFD04 input/output (HIF) 10: Setting prohibited 11: D20 input/output (BSC)
9 8
PE12MD1 PE12MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE12 Mode Select the function of pin PE12/HIFD03/D19. 00: PE12 input/output (port) 01: HIFD03 input/output (HIF) 10: Setting prohibited 11: D19 input/output (BSC)
7 6
PE11MD1 PE11MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE11 Mode Select the function of pin PE11/HIFD02/D18. 00: PE11 input/output (port) 01: HIFD02 input/output (HIF) 10: Setting prohibited 11: D18 input/output (BSC)
5 4
PE10MD1 PE10MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE10 Mode Select the function of pin PE10/HIFD01/D17. 00: PE10 input/output (port) 01: HIFD01 input/output (HIF) 10: Setting prohibited 11: D17 input/output (BSC)
Rev. 6.00 Jul. 15, 2009 Page 573 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 3 2
Bit Name PE9MD1 PE9MD0
Initial Value 0 0 (When in nonHIF boot mode) 0 1 (When in HIF boot mode)
R/W Description R/W PE9 Mode R/W Select the function of pin PE09/HIFD00/D16. 00: PE09 input/output (port) 01: HIFD00 input/output (HIF) 10: Setting prohibited 11: D16 input/output (BSC)
1
0
R
Reserved This bit is always read as 0. The write value should always be 0.
0
PE8MD0
0 (When in nonHIF boot mode) 1 (When in HIF boot mode)
R/W PE8 Mode Selects the function of pin PE08/HIFCS. 0: PE08 input/output (port) 1: HIFCS input (HIF)
* PECRL2
Bit 15 Bit Name Initial Value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0. 14 PE7MD0 0 (When in non-HIF boot mode) 1 (When in HIF boot mode) R/W PE7 Mode Selects the function of pin PE07/HIFRS. 0: PE07 input/output (port) 1: HIFRS input (HIF)
Rev. 6.00 Jul. 15, 2009 Page 574 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 13 12
Bit Name PE6MD1 PE6MD0
Initial Value 0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W R/W
Description PE6 Mode Select the function of pin PE06/HIFWR/SIOFSYNC0. 00: PE06 input/output (port) 01: HIFWR input (HIF) 10: SIOFSYNC0 input/output (SIOF) 11: Setting prohibited
11
0
R
Reserved This bit is always read as 0. The write value should always be 0.
10
PE5MD0
0 (When in non-HIF boot mode) 1 (When in HIF boot mode)
R/W
PE5 Mode Selects the function of pin PE05/HIFRD. 0: PE05 input/output (port) 1: HIFRD input (HIF)
9 8
PE4MD1 PE4MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE4 Mode Select the function of pin PE04/HIFINT/TXD_SIO0. 00: PE04 input/output (port) 01: HIFINT input (HIF) 10: TXD_SIO0 output (SIOF) 11: Setting prohibited
7
0
R
Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 575 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Bit 6
Bit Name PE3MD0
Initial Value R/W 1 R/W
Description PE3 Mode Selects the function of pin PE03/HIFMD. 0: PE03 input/output (port) 1: HIFMD input (HIF)
5 4
PE2MD1 PE2MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE2 Mode Select the function of pin PE02/HIFDREQ/RXD_SIO0. 00: PE02 input/output (port) 01: HIFDREQ output (HIF) 10: RXD_SIO0 input (SIOF) 11: Setting prohibited
3 2
PE1MD0 PE1MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE1 Mode Select the function of pin PE01/HIFRDY/SIOMCLK0. 00: PE01 input/output (port) 01: HIFRDY output (HIF) 10: SIOMCLK0 input (SIOF) 11: Setting prohibited
1 0
PE0MD1 PE0MD0
0 0 (When in non-HIF boot mode) 0 1 (When in HIF boot mode)
R/W R/W
PE0 Mode Select the function of pin PE00/HIFEBL/SCK_SIO0. 00: PE00 input/output (port) 01: HIFEBL input (HIF) 10: SCK_SIO0 input/output (SIOF) 11: Setting prohibited
Rev. 6.00 Jul. 15, 2009 Page 576 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
18.2
18.2.1
Notes on Usage
Restriction in Using
In the use of the pins listed in the following table, please set the data registers and also pin function controller (i.e. in the use of the output functions EXCEPT the function 1, please DO NOT change the initial value (= 0) in the data registers of that pins). Table 18.7 Pins restricted in using in SH7619
Function 1 (Related Module) PD2 input/output (port) PD4 input/output (port) PD5 input/output (port) Function 2 (Related Module) IRQ2 input (INTC) IRQ4 input (INTC) IRQ5 input (INTC) Function 3 (Related Module) TxD1 output (SCIF) SCK1 input/output (SCIF) TxD2 input/output (SCIF) Function 4 (Related Module) DREQ0 input (DMAC) DACK0 output (DMAC) DREQ1 input (DMAC)
18.2.2
Details of Restriction
For the logical specs of the output functions of the pins listed in the above table (i.e. logical sum of the value of the data register), when the data register of the pins is set to '1', the output of the pins will be FIXED to '1' (= High). For the initial value of that data register is '0', it DOES NOT cause any problems in the use of NOT writing any data at all after power-on-reset. In addition, the output is fixed to '1' (= High) in the use of writing '1' to the data register, it must be safe with the sets that have already worked without any problems UNLESS change the value of PFC, whereas input functions do work safety even in the function 1.
Rev. 6.00 Jul. 15, 2009 Page 577 of 816 REJ09B0237-0600
Section 18 Pin Function Controller (PFC)
Rev. 6.00 Jul. 15, 2009 Page 578 of 816 REJ09B0237-0600
Section 19 I/O Ports
Section 19 I/O Ports
This LSI has 26 ports (ports A, B, C, D, and E). Port A, port B, port C, port D, and port E are 10bit, 14-bit, 21-bit, 8-bit, and 25-bit I/O port, respectively. The pins of each port are multiplexed with other functions. The pin function controller (PFC) handles the selection of multiplex pin functions. Each port has a data register to store data of pin.
19.1
Port A
Port A of this LSI is an I/O port with ten pins as shown in figure 19.1.
PA16 (input/output)/A16 (output) PA17 (input/output)/A17 (output) PA18 (input/output)/A18 (output) PA19 (input/output)/A19 (output) Port A PA20 (input/output)/A20 (output) PA21 (input/output)/A21 (output)/SCK_SIO0 (input/output) PA22 (input/output)/A22 (output)/SIOMCLK0 (input) PA23 (input/output)/A23 (output)/RXD_SIO0 (input) PA24 (input/output)/A24 (output)/TXD_SIO0 (output) PA25 (input/output)/A25 (output)/SIOFSYNC0 (input/output)
Figure 19.1 Port A 19.1.1 Register Description
Port A is a 10-bit I/O port that has a following register. For details on the address of this register and the states of this register in each processing state, see section 24, List of Registers. * Port A data register H (PADRH) 19.1.2 Port A Data Register H (PADRH)
PADRH is a 16-bit readable/writable register which stores data for port A. Bits PA25DR to PA16DR correspond to pins PA25 to PA16. (Description of multiplexed functions is omitted.)
Rev. 6.00 Jul. 15, 2009 Page 579 of 816 REJ09B0237-0600
Section 19 I/O Ports
When the pin function is general output port, if the value is written to PADRH, the value is output from the pin; if PADRH is read, the value written to the register is directly read regardless of the pin state. When the pin function is general input port, not the value of register but pin state is directly read if PADRH is read. Data can be written to PADRH but no effect on the pin state. Table 19.1 shows the reading/writing function of the port A data register H.
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 9 8 7 6 5 4 3 2 1 0 PA25DR PA24DR PA23DR PA22DR PA21DR PA20DR PA19DR PA18DR PA17DR PA16DR 0 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W See table 19.1.
15 to 10
Table 19.1 Port A Data Register H (PADRH) Read/Write Operation * Bits 9 to 0 in PADRH
Pin Function General input General output Other functions PAIORH 0 1 * Read Pin state PADRH value PADRH value Write Data can be written to PADRH but no effect on the pin state. Written value is output from the pin. Data can be written to PADRH but no effect on the pin state.
Rev. 6.00 Jul. 15, 2009 Page 580 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.2
Port B
Port B of this LSI is an I/O port with 14 pins as shown in figure 19.2.
PB00 (input/output)/WAIT (input) PB01 (input/output)/IOIS16 (input) PB02 (input/output)/CKE (output) PB03 (input/output)/CAS (output) PB04 (input/output)/RAS (output) PB05 (input/output)/WE2(BE2)/DQMUL/ICIORD (output) PB06 (input/output)/WE3(BE3)/DQMUU/ICIOWR (output) Port B PB07 (input/output)/CE2B (output) PB08 (input/output)/CS6B (output)/CE1B (output) PB09 (input/output)/CE2A (output) PB10 (input/output)/CS5B (output)/CE1A (output) PB11 (input/output)/CS4 (output) PB12 (input/output)/CS3 (output) PB13 (input/output)/BS (output)
Figure 19.2 Port B 19.2.1 Register Description
Port B is a 14-bit I/O port that has a following register. For details on the address of this register and the states of this register in each processing state, see section 24, List of Registers. * Port B data register L (PBDRL) 19.2.2 Port B Data Register L (PBDRL)
PBDRL is a 16-bit readable/writable register which stores data for port B. Bits PB13DR to PB0DR correspond to pins PB13 to PB00. (Description of multiplexed functions is omitted.) When the pin function is general output port, if the value is written to PBDRL, the value is output from the pin; if PBDRL is read, the value written to the register is directly read regardless of the pin state.
Rev. 6.00 Jul. 15, 2009 Page 581 of 816 REJ09B0237-0600
Section 19 I/O Ports
When the pin function is general input port, not the value of register but pin state is directly read if PBDRL is read. Data can be written to PBDRL but no effect on the pin state. Table 19.2 shows the reading/writing function of the port B data register L.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit Name PB13DR PB12DR PB11DR PB10DR PB9DR PB8DR PB7DR PB6DR PB5DR PB4DR PB3DR PB2DR PB1DR PB0DR Initial Value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R/W R R R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W Description Reserved These bits are always read as 0. The write value should always be 0. See table 19.2.
Table 19.2 Port B Data Register L (PBDRL) Read/Write Operation * Bits 13 to 0 in PBDRL
Pin Function General input General output Other functions PBIORL 0 1 * Read Pin state PBDRL value PBDRL value Write Data can be written to PBDRL but no effect on the pin state. Written value is output from the pin. Data can be written to PBDRL but no effect on the pin state.
Rev. 6.00 Jul. 15, 2009 Page 582 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.3
Port C
Port C of this LSI is an I/O port with 21 pins as shown in figure 19.3.
PC00 (input/output)/MII_RXD0 (input) PC01 (input/output)/MII_RXD1 (input) PC02 (input/output)/MII_RXD2 (input) PC03 (input/output)/MII_RXD3 (input) PC04 (input/output)/MII_TXD0 (output)/SPEED100 (output) PC05 (input/output)/MII_TXD1 (output)/LINK (output) PC06 (input/output)/MII_TXD2 (output)/CRS (output) PC07 (input/output)/MII_TXD3 (output)/DUPLEX (output) PC08 (input/output)/RX_DV (input) PC09 (input/output)/RX_ER (input) Port C PC10 (input/output)/RX_CLK (input) PC11 (input/output)/TX_ER (output) PC12 (input/output)/TX_EN (output) PC13 (input/output)/TX_CLK (input) PC14 (input/output)/COL (input) PC15 (input/output)/CRS (input) PC16 (input/output)/MDIO (input/output) PC17 (input/output)/MDC (output) PC18 (input/output)/LNKSTA (input) PC19 (input/output)/EXOUT (output) PC20 (input/output)/WOL (output)
Figure 19.3 Port C
Rev. 6.00 Jul. 15, 2009 Page 583 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.3.1
Register Description
Port C is a 21-bit I/O port that has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * Port C data register H (PCDRH) * Port C data register L (PCDRL) 19.3.2 Port C Data Registers H and L (PCDRH and PCDRL)
PCDRH and PCDRL are 16-bit readable/writable registers that stores data for port C. Bits PC20DR to PC0DR correspond to pins PC20 to PC00. (Description of multiplexed functions is omitted.) When the pin function is general output port, if the value is written to PCDRH or PCDRL, the value is output from the pin; if PCDRH or PCDRL is read, the value written to the register is directly read regardless of the pin state. When the pin function is general input port, not the value of register but pin state is directly read if PCDRH or PCDRL is read. Data can be written to PCDRH or PCDRL but no effect on the pin state. Table 19.3 shows the reading/writing function of the port C data registers H and L. * PCDRH
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 4 3 2 1 0 PC20DR PC19DR PC18DR PC17DR PC16DR 0 0 0 0 0 R/W R/W R/W R/W R/W See table 19.3.
15 to 5
Rev. 6.00 Jul. 15, 2009 Page 584 of 816 REJ09B0237-0600
Section 19 I/O Ports
* PCDRL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit Name PC15DR PC14DR PC13DR PC12DR PC11DR PC10DR PC9DR PC8DR PC7DR PC6DR PC5DR PC4DR PC3DR PC2DR PC1DR PC0DR Initial Value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W Description See table 19.3.
Table 19.3 Port C Data Registers H and L (PCDRH and PCDRL) Read/Write Operation * Bits 4 to 0 in PCDRH and Bits 15 to 0 in PCDRL
Pin Function General input General output Other functions PBIORL 0 1 * Read Pin state PCDRH or PCDRL value PCDRH or PCDRL value Write Data can be written to PCDRH or PCDRL but no effect on the pin state. Written value is output from the pin. Data can be written to PCDRH or PCDRL but no effect on the pin state.
Rev. 6.00 Jul. 15, 2009 Page 585 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.4
Port D
Port D of this LSI is an I/O port with eight pins as shown in figure 19.4.
PD0 (input/output)/IRQ0 (input)/TEND0 (output) PD1 (input/output)/IRQ1 (input)/TEND1 (output) PD2 (input/output)/IRQ2 (input)/TxD1 (output)/DREQ0 (input) PD3 (input/output)/IRQ3 (input)/RxD1 (input)/DACK0(output) Port D PD4 (input/output)/IRQ4 (input)/SCK1 (input/output) PD5 (input/output)/IRQ5 (input)/TxD2 (output)/DREQ1 (input) PD6 (input/output)/IRQ6 (input)/RxD2 (input)/DACK0(output) PD7 (input/output)/IRQ7 (input)/SCK2 (input/output)
Figure 19.4 Port D 19.4.1 Register Description
Port D is an 8-bit I/O port that has a following register. For details on the address of this register and the states of this register in each processing state, see section 24, List of Registers. * Port D data register L (PDDRL) 19.4.2 Port D Data Register L (PDDRL)
PDDRL is a 16-bit readable/writable register which stores data for port D. Bits PD7DR to PD0DR correspond to pins PD7 to PD0. (Description of multiplexed functions is omitted.) When the pin function is general output port, if the value is written to PDDRL, the value is output from the pin; if PDDRL is read, the value written to the register is directly read regardless of the pin state. When the pin function is general input port, not the value of register but pin state is directly read if PDDRL is read. Data can be written to PDDRL but no effect on the pin state. Table 19.4 shows the reading/writing function of the port D data register L.
Rev. 6.00 Jul. 15, 2009 Page 586 of 816 REJ09B0237-0600
Section 19 I/O Ports
Bit
Bit Name
Initial Value All 0
R/W R
Description Reserved These bits are always read as 0. The write value should always be 0.
15 to 8
7 6 5 4 3 2 1 0
PD7DR PD6DR PD5DR PD4DR PD3DR PD2DR PD1DR PD0DR
0 0 0 0 0 0 0 0
R/W R/W R/W R/W R/W R/W R/W R/W
See table 19.4.
Table 19.4 Port D Data Register L (PDDRL) Read/Write Operation * Bits 7 to 0 in PDDRL
Pin Function General input General output Other functions PBIORL 0 1 * Read Pin state PDDRL value PDDRL value Write Data can be written to PDDRL but no effect on the pin state. Written value is output from the pin. Data can be written to PDDRL but no effect on the pin state.
Rev. 6.00 Jul. 15, 2009 Page 587 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.5
Port E
Port E of this LSI is an I/O port with 25 pins as shown in figure 19.5.
PE00 (input/output)/HIFEBL (input)/SCK_SIO0 (input/output) PE01 (input/output)/HIFRDY (output)/SIOMCLK0 (input) PE02 (input/output)/HIFDREQ (output)/RXD_SIO0 (input) PE03 (input/output)/HIFMD (input) PE04 (input/output)/HIFINT (output)/TXD_SIO0 (output) PE05 (input/output)/HIFRD (input) PE06 (input/output)/HIFWR (input)/SIOFSYNC (input/output) PE07 (input/output)/HIFRS (input) PE08 (input/output)/HIFCS (input) PE09 (input/output)/HIFD00 (input/output)/D16 (input/output) PE10 (input/output)/HIFD01 (input/output)/D17 (input/output) PE11 (input/output)/HIFD02 (input/output)/D18 (input/output) Port E PE12 (input/output)/HIFD03 (input/output)/D19 (input/output) PE13 (input/output)/HIFD04 (input/output)/D20 (input/output) PE14 (input/output)/HIFD05 (input/output)/D21 (input/output) PE15 (input/output)/HIFD06 (input/output)/TxD0 (output)/D22 (input/output) PE16 (input/output)/HIFD07 (input/output)/RxD0 (input)/D23 (input/output) PE17 (input/output)/HIFD08 (input/output)/SCK0 (input/output)/D24 (input/output) PE18 (input/output)/HIFD09 (input/output)/TxD1 (output)/D25 (input/output) PE19 (input/output)/HIFD10 (input/output)/RxD1 (input)/D26 (input/output) PE20 (input/output)/HIFD11 (input/output)/SCK1 (input/output)/D27 (input/output) PE21 (input/output)/HIFD12 (input/output)/RTS0 (output)/D28 (input/output) PE22 (input/output)/HIFD13 (input/output)/CTS0 (input)/D29 (input/output) PE23 (input/output)/HIFD14 (input/output)/RTS1 (output)/D30 (input/output) PE24 (input/output)/HIFD15 (input/output)/CTS1 (input)/D31 (input/output)
Figure 19.5 Port E
Rev. 6.00 Jul. 15, 2009 Page 588 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.5.1
Register Description
Port E is a 25-bit I/O port that has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * Port E data register H (PEDRH) * Port E data register L (PEDRL) 19.5.2 Port E Data Registers H and L (PEDRH and PEDRL)
PEDRH and PEDRL are 16-bit readable/writable registers that store data for port E. Bits PE24DR to PE0DR correspond to pins PE24 to PE00. (Description of multiplexed functions is omitted.) When the pin function is general output port, if the value is written to PEDRH or PEDRL, the value is output from the pin; if PEDRH or PEDRL is read, the value written to the register is directly read regardless of the pin state. When the pin function is general input port, not the value of register but pin state is directly read if PEDRH or PEDRL is read. Data can be written to PEDRH or PEDRL but no effect on the pin state. Table 19.5 shows the reading/writing function of the port E data registers H and L. * PEDRH
Bit Bit Name Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 8 7 6 5 4 3 2 1 0 PE24DR PE23DR PE22DR PE21DR PE20DR PE19DR PE18DR PE17DR PE16DR 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W See table 19.5.
15 to 9
Rev. 6.00 Jul. 15, 2009 Page 589 of 816 REJ09B0237-0600
Section 19 I/O Ports
* PEDRL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Bit Name PE15DR PE14DR PE13DR PE12DR PE11DR PE10DR PE9DR PE8DR PE7DR PE6DR PE5DR PE4DR PE3DR PE2DR PE1DR PE0DR Initial Value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W Description See table 19.5.
Table 19.5 Port E Data Registers H, L (PEDRH, PEDRL) Read/Write Operation * Bits 8 to 0 in PEDRH and Bits 15 to 0 in PEDRL
Pin Function General input General output Other functions PBIORL 0 1 * Read Pin state PEDRH or PEDRL value PEDRH or PEDRL value Write Data can be written to PEDRH or PEDRL but no effect on the pin state. Written value is output from the pin. Data can be written to PEDRH or PEDRL but no effect on the pin state.
Rev. 6.00 Jul. 15, 2009 Page 590 of 816 REJ09B0237-0600
Section 19 I/O Ports
19.6
Usage Notes
1. When pins that are multiplexed with general I/O is used as output pins for other functions, these pins work as general output pins for the period of 1 x tPCYC synchronized with internal power-on reset by WDT overflow. For example, when the pin PB12/CS3 works as CS3 and the PB12DR bit in PBDRL is set to 0, the pin is driven low for the period of 1 x tPCYC and may lead to memory malfunction. To prevent this, port registers that correspond to pins used for the strobe output must be set to strobe non-active level. This case does not apply to the power-on reset from the RES pin. 2. The weak keeper circuit is included in all pins except MD5, MD3, MD2, MD1, MD0, ASEMD, TESTMD, EXTAL, XTAL, TxP, TxM, RxP, RxM, EXRES1, and TSTBUSA. The weak keeper is a circuit, always operating while the power is on, that fixes the input in I/O pins to low or high when the pins are not driven from outside. Notes on processing the input pins are as follows: When using pins having the weak keeper circuit as input pins and driving these pins to a certain level from outside, adjust the resistance of pull-up/pull-down resistors to let the weak keeper circuit keep the intended levels. (2 k and 8 k are recommended respectively.) The larger the resistance is, the longer the transition time is. In addition, a large resistance may fail to let the weak keeper circuit to keep the intended levels. Therefore, when the resistors adjusted comparatively large are used, ensure that any transition does not delay in the system. While using the pins having the weak keeper circuit as input pins, if their levels do not matter, there is no need to deal with pins from outside. MD5, MD3, MD2, MD1, MD0, ASEMD, and TESTMD. Drive these to intended levels from outside. Since the weak keeper circuit is not included in those pins, comparatively large resistance in pull-up/pull-down resistors can be used. EXTAL, and XTAL See section 8.6, Notes on Board Design in section 8, Clock Pulse Generator (CPG). 3. Since the HIFMD pin is not initially set to function as a general port pin, it must be pulled up or down externally to fix its state. 4. When using a multiplexed pin with a function not selected with its initial value (for example, using the PB12/CS3 pin, the initial function of which is PB12, as the CS3 pin), the pin must be pulled up or down externally at least after a reset until its pin function is selected by software to fix its state.
Rev. 6.00 Jul. 15, 2009 Page 591 of 816 REJ09B0237-0600
Section 19 I/O Ports
Rev. 6.00 Jul. 15, 2009 Page 592 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Section 20 User Break Controller (UBC)
The user break controller (UBC) provides functions that simplify program debugging. These functions make it easy to design an effective self-monitoring debugger, enabling the chip to debug programs without using an in-circuit emulator. Break conditions that can be set in the UBC are instruction fetch or data read/write access, data size, data contents, address value, and stop timing in the case of instruction fetch.
20.1
Features
The UBC has the following features: * The following break comparison conditions can be set. Number of break channels: two channels (channels A and B) User break can be requested as either the independent or sequential condition on channels A and B (sequential break: when channel A and channel B match with break conditions in the different bus cycles in that order, a break condition is satisfied). Address (Compares addresses 32 bits): Comparison bits are maskable in 1-bit units; user can mask addresses at lower 12 bits (4-k page), lower 10 bits (1-k page), or any size of page, etc. One of the two address buses (L-bus address (LAB) and I-bus address (IAB)) can be selected. Data (only on channel B, 32-bit maskable) One of the two data buses (logic data bus (LDB) and internal data bus (IDB)) can be selected. Bus cycle: Instruction fetch or data access Read/write Operand size: Byte, word, or longword * User break interrupt is generated upon satisfying break conditions. A user-designed user-break condition interrupt exception processing routine can be run. * In an instruction fetch cycle, it can be selected that a break is set before or after an instruction is executed. * Maximum repeat times for the break condition (only for channel B): 212 - 1 times. * Four pairs of branch source/destination buffers.
Rev. 6.00 Jul. 15, 2009 Page 593 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Figure 20.1 shows a block diagram of the UBC.
Access control
IAB
LAB Access comparator
MDB
BBRA BARA
Address comparator
BAMRA
Channel A
Access comparator
BBRB
BARB Address comparator BAMRB
Data comparator Channel B
BBRB BDMRB BETR BRSR
PC trace BRDR
Control
BRCR
LDB/IDB
CPU state signal
User break request UBC location
[Legend] BBRA: BARA: BAMRA: BBRB: BARB: BAMRB:
Break bus cycle register A Break address register A Break address mask register A Break bus cycle register B Break address register B Break address mask register B
BDRB: BDMRB: BETR: BRSR: BRDR: BRCR:
Break data register B Break data mask register B Execution times break register Branch source register Branch destination register Break control register
Figure 20.1 Block Diagram of UBC
Rev. 6.00 Jul. 15, 2009 Page 594 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2
Register Descriptions
The user break controller has the following registers. For details on register addresses and access sizes, refer to section 24, List of Registers. * * * * * * * * * * * * Break address register A (BARA) Break address mask register A (BAMRA) Break bus cycle register A (BBRA) Break address register B (BARB) Break address mask register B (BAMRB) Break bus cycle register B (BBRB) Break data register B (BDRB) Break data mask register B (BDMRB) Break control register (BRCR) Execution times break register (BETR) Branch source register (BRSR) Branch destination register (BRDR) Break Address Register A (BARA)
20.2.1
BARA is a 32-bit readable/writable register. BARA specifies the address used for a break condition in channel A.
Bit 31 to 0 Bit Name BAA31 to BAA 0 Initial Value All 0 R/W R/W Description Break Address A Store the address on the LAB or IAB specifying break conditions of channel A.
Rev. 6.00 Jul. 15, 2009 Page 595 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2.2
Break Address Mask Register A (BAMRA)
BAMRA is a 32-bit readable/writable register. BAMRA specifies bits masked in the break address specified by BARA.
Bit 31 to 0 Bit Name BAMA31 to BAMA 0 Initial Value All 0 R/W R/W Description Break Address Mask A Specify bits masked in the channel A break address bits specified by BARA (BAA31 to BAA0). 0: Break address bit BAAn of channel A is included in the break condition 1: Break address bit BAAn of channel A is masked and is not included in the break condition Note: n = 31 to 0
20.2.3
Break Bus Cycle Register A (BBRA)
Break bus cycle register A (BBRA) is a 16-bit readable/writable register, which specifies (1) L bus cycle or I bus cycle, (2) instruction fetch or data access, (3) read or write, and (4) operand size in the break conditions of channel A.
Bit 15 to 8 Initial Bit Name Value -- All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 7 6 CDA1 CDA0 0 0 R/W R/W L Bus Cycle/I Bus Cycle Select A Select the L bus cycle or I bus cycle as the bus cycle of the channel A break condition. 00: Condition comparison is not performed 01: The break condition is the L bus cycle 10: The break condition is the I bus cycle 11: The break condition is the L bus cycle
Rev. 6.00 Jul. 15, 2009 Page 596 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Bit 5 4
Initial Bit Name Value IDA1 IDA0 0 0
R/W R/W R/W
Description Instruction Fetch/Data Access Select A Select the instruction fetch cycle or data access cycle as the bus cycle of the channel A break condition. 00: Condition comparison is not performed 01: The break condition is the instruction fetch cycle 10: The break condition is the data access cycle 11: The break condition is the instruction fetch cycle or data access cycle
3 2
RWA1 RWA0
0 0
R/W R/W
Read/Write Select A Select the read cycle or write cycle as the bus cycle of the channel A break condition. 00: Condition comparison is not performed 01: The break condition is the read cycle 10: The break condition is the write cycle 11: The break condition is the read cycle or write cycle
1 0
SZA1 SZA0
0 0
R/W R/W
Operand Size Select A Select the operand size of the bus cycle for the channel A break condition. 00: The break condition does not include operand size 01: The break condition is byte access 10: The break condition is word access 11: The break condition is longword access
20.2.4
Break Address Register B (BARB)
BARB is a 32-bit readable/writable register. BARB specifies the address used for a break condition in channel B.
Bit 31 to 0 Initial Bit Name Value BAB31 to All 0 BAB 0 R/W R/W Description Break Address B Store an address of LAB or IAB which specifies a break condition in channel B.
Rev. 6.00 Jul. 15, 2009 Page 597 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2.5
Break Address Mask Register B (BAMRB)
BAMRB is a 32-bit readable/writable register. BAMRB specifies bits masked in the break address specified by BARB.
Bit 31 to 0 Bit Name BAMB31 to BAMB 0 Initial Value All 0 R/W R/W Description Break Address Mask B Specify bits masked in the break address of channel B specified by BARB (BAB31 to BAB0). 0: Break address BABn of channel B is included in the break condition 1: Break address BABn of channel B is masked and is not included in the break condition Note: n = 31 to 0
20.2.6
Break Data Register B (BDRB)
BDRB is a 32-bit readable/writable register. BDBR selects data used for a break condition in channel B.
Bit 31 to 0 Bit Name BDB31 to BDB 0 Initial Value All 0 R/W R/W Description Break Data Bit B Store data which specifies a break condition in channel B. BDRB specifies the break data on LDB or IDB. Notes: 1. Specify an operated size when including the value of the data bus in the break condition. 2. When the byte size is selected as a break condition, the same byte must be set in bits 15 to 8 and 7 to 0 in BDRB as the break data.
Rev. 6.00 Jul. 15, 2009 Page 598 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2.7
Break Data Mask Register B (BDMRB)
BDMRB is a 32-bit readable/writable register. BDMRB specifies bits masked in the break data specified by BDRB.
Bit 31 to 0 Bit Name BDMB31 to BDMB 0 Initial Value All 0 R/W R/W Description Break Data Mask B Specify bits masked in the break data of channel B specified by BDRB (BDB31 to BDB0). 0: Break data BDBn of channel B is included in the break condition 1: Break data BDBn of channel B is masked and is not included in the break condition Note: n = 31 to 0 Notes: 1. Specify an operated size when including the value of the data bus in the break condition. 2. When the byte size is selected as a break condition, the same data must be set in bits 15 to 8 and 7 to 0 in BDRB as the break mask data.
20.2.8
Break Bus Cycle Register B (BBRB)
Break bus cycle register B (BBRB) is a 16-bit readable/writable register, which specifies (1) L bus cycle or I bus cycle, (2) instruction fetch or data access, (3) read or write, and (4) operand size in the break conditions of channel B.
Bit 15 to 8 Bit Name -- Initial Value All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 599 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Bit 7 6
Bit Name CDB1 CDB0
Initial Value 0 0
R/W R/W R/W
Description L Bus Cycle/I Bus Cycle Select B Select the L bus cycle or I bus cycle as the bus cycle of the channel B break condition. 00: Condition comparison is not performed 01: The break condition is the L bus cycle 10: The break condition is the I bus cycle 11: The break condition is the L bus cycle
5 4
IDB1 IDB0
0 0
R/W R/W
Instruction Fetch/Data Access Select B Select the instruction fetch cycle or data access cycle as the bus cycle of the channel B break condition. 00: Condition comparison is not performed 01: The break condition is the instruction fetch cycle 10: The break condition is the data access cycle 11: The break condition is the instruction fetch cycle or data access cycle
3 2
RWB1 RWB0
0 0
R/W R/W
Read/Write Select B Select the read cycle or write cycle as the bus cycle of the channel B break condition. 00: Condition comparison is not performed 01: The break condition is the read cycle 10: The break condition is the write cycle 11: The break condition is the read cycle or write cycle
1 0
SZB1 SZB0
0 0
R/W R/W
Operand Size Select B Select the operand size of the bus cycle for the channel B break condition. 00: The break condition does not include operand size 01: The break condition is byte access 10: The break condition is word access 11: The break condition is longword access
Rev. 6.00 Jul. 15, 2009 Page 600 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2.9
Break Control Register (BRCR)
BRCR sets the following conditions: * Channels A and B are used in two independent channel conditions or under the sequential condition. * A break is set before or after instruction execution. * Specify whether to include the number of execution times on channel B in comparison conditions. * Specify whether to include data bus on channel B in comparison conditions. * Enable PC trace. The break control register (BRCR) is a 32-bit readable/writable register that has break conditions match flags and bits for setting a variety of break conditions.
Bit 31 to 16 Initial Bit Name Value -- All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 15
SCMFCA
0
R/W
L Bus Cycle Condition Match Flag A When the L bus cycle condition in the break conditions set for channel A is satisfied, this flag is set to 1 (not cleared to 0). In order to clear this flag, write 0 into this bit. 0: The L bus cycle condition for channel A does not match 1: The L bus cycle condition for channel A matches
14
SCMFCB
0
R/W
L Bus Cycle Condition Match Flag B When the L bus cycle condition in the break conditions set for channel B is satisfied, this flag is set to 1 (not cleared to 0). In order to clear this flag, write 0 into this bit. 0: The L bus cycle condition for channel B does not match 1: The L bus cycle condition for channel B matches
Rev. 6.00 Jul. 15, 2009 Page 601 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Bit 13
Initial Bit Name Value
SCMFDA
R/W R/W
Description I Bus Cycle Condition Match Flag A When the I bus cycle condition in the break conditions set for channel A is satisfied, this flag is set to 1 (not cleared to 0). In order to clear this flag, write 0 into this bit. 0: The I bus cycle condition for channel A does not match 1: The I bus cycle condition for channel A matches
0
12
SCMFDB
0
R/W
I Bus Cycle Condition Match Flag B When the I bus cycle condition in the break conditions set for channel B is satisfied, this flag is set to 1 (not cleared to 0). In order to clear this flag, write 0 into this bit. 0: The I bus cycle condition for channel B does not match 1: The I bus cycle condition for channel B matches
11
PCTE
0
R/W
PC Trace Enable 0: Disables PC trace 1: Enables PC trace
10
PCBA
0
R/W
PC Break Select A Selects the break timing of the instruction fetch cycle for channel A as before or after instruction execution. 0: PC break of channel A is set before instruction execution 1: PC break of channel A is set after instruction execution
9, 8
--
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
7
DBEB
0
R/W
Data Break Enable B Selects whether or not the data bus condition is included in the break condition of channel B. 0: No data bus condition is included in the condition of channel B 1: The data bus condition is included in the condition of channel B
Rev. 6.00 Jul. 15, 2009 Page 602 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Bit 6
Initial Bit Name Value PCBB 0
R/W R/W
Description PC Break Select B Selects the break timing of the instruction fetch cycle for channel B as before or after instruction execution. 0: PC break of channel B is set before instruction execution 1: PC break of channel B is set after instruction execution
5, 4
--
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
3
SEQ
0
R/W
Sequence Condition Select Selects two conditions of channels A and B as independent or sequential conditions. 0: Channels A and B are compared under independent conditions 1: Channels A and B are compared under sequential conditions (channel A, then channel B)
2, 1
--
All 0
R
Reserved These bits are always read as 0. The write value should always be 0.
0
ETBE
0
R/W
Number of Execution Times Break Enable Enables the execution-times break condition only on channel B. If this bit is 1 (break enable), a user break is issued when the number of break conditions matches with the number of execution times that is specified by BETR. 0: The execution-times break condition is disabled on channel B 1: The execution-times break condition is enabled on channel B
Rev. 6.00 Jul. 15, 2009 Page 603 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.2.10 Execution Times Break Register (BETR) BETR is a 16-bit readable/writable register. When the execution-times break condition of channel B is enabled, this register specifies the number of execution times to make the break. The maximum number is 212 - 1 times. Every time the break condition is satisfied, BETR is decremented by 1. A break is issued when the break condition is satisfied after BETR becomes H'0001.
Bit 15 to 12 Initial Bit Name Value -- All 0 R/W R Description Reserved These bits are always read as 0. The write value should always be 0. 11 to 0 BET11 to BET0 All 0 R/W Number of Execution Times
20.2.11 Branch Source Register (BRSR) BRSR is a 32-bit read-only register. BRSR stores bits 27 to 0 in the address of the branch source instruction. BRSR has the flag bit that is set to 1 when a branch occurs. This flag bit is cleared to 0 when BRSR is read, the setting to enable PC trace is made, or BRSR is initialized by a power-on reset. Other bits are not initialized by a power-on reset. The four BRSR registers have a queue structure and a stored register is shifted at every branch.
Bit 31 Bit Name SVF Initial Value 0 R/W R Description BRSR Valid Flag Indicates whether or not the branch source address is stored. When a branch is made, this flag is set to 1. This flag is cleared to 0 by one of the following conditions: when this flag is read from this register, when PC trace is enabled, and when a power-on reset is generated. 0: The value of BRSR register is invalid 1: The value of BRSR register is valid
Rev. 6.00 Jul. 15, 2009 Page 604 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Bit 30 to 28
Bit Name --
Initial Value All 0
R/W R
Description Reserved These bits are always read as 0. The write value should always be 0.
27 to 0
BSA27 to BSA0
Undefined
R
Branch Source Address Store bits 27 to 0 of the branch source address.
20.2.12 Branch Destination Register (BRDR) BRDR is a 32-bit read-only register. BRDR stores bits 27 to 0 in the address of the branch destination instruction. BRDR has the flag bit that is set to 1 when a branch occurs. This flag bit is cleared to 0 when BRDR is read, the setting to enable PC trace is made, or BRDR is initialized by a power-on reset. Other bits are not initialized by a power-on reset. The four BRDR registers have a queue structure and a stored register is shifted at every branch.
Bit 31 Bit Name DVF Initial Value 0 R/W R Description BRDR Valid Flag Indicates whether or not the branch source address is stored. When a branch is made, this flag is set to 1. This flag is cleared to 0 by one of the following conditions: when this flag is read from this register, when PC trace is enabled, and when a power-on reset is generated. 0: The value of BRDR register is invalid 1: The value of BRDR register is valid 30 to 28 -- All 0 R Reserved These bits are always read as 0. The write value should always be 0. 27 to 0 BDA27 to BDA0
Undefined
R
Branch Destination Address Store bits 27 to 0 of the branch destination address.
Rev. 6.00 Jul. 15, 2009 Page 605 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.3
20.3.1
Operation
Flow of User Break Operation
The flow from setting of break conditions to user break exception processing is described below: 1. The break addresses are set in the break address registers (BARA and BARB). The masked addresses are set in the break address mask registers (BAMRA and BAMRB). The break data is set in the break data register (BDRB). The masked data is set in the break data mask register (BDMRB). The bus break conditions are set in the break bus cycle registers (BBRA and BBRB). There are three control bit combinations in both BBRA and BBRB: bits to select Lbus cycle or I-bus cycle, bits to select instruction fetch or data access, and bits to select read or write. No user break will be generated if one of these combinations is set to B'00. The respective conditions are set in the bits of the break control register (BRCR). Make sure to set all registers related to breaks before setting BBRA/BBRB. 2. When the break conditions are satisfied, the UBC sends a user break request to the CPU and sets the L bus condition match flag (SCMFCA or SCMFCB) and the I bus condition match flag (SCMFDA or SCMFDB) for the appropriate channel. 3. The appropriate condition match flags (SCMFCA, SCMFDA, SCMFCB, and SCMFDB) can be used to check if the set conditions match or not. The matching of the conditions sets flags. Reset the flags by writing 0 before they are used again. 4. There is a chance that the data access break and its following instruction fetch break occur around the same time, there will be only one break request to the CPU, but these two break channel match flags could be both set.
Rev. 6.00 Jul. 15, 2009 Page 606 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.3.2
Break on Instruction Fetch Cycle
1. When L bus/instruction fetch/read/word or longword is set in the break bus cycle register (BBRA/BBRB), the break condition becomes the L bus instruction fetch cycle. Whether it breaks before or after the execution of the instruction can then be selected with the PCBA/PCBB bit of the break control register (BRCR) for the appropriate channel. If an instruction fetch cycle is set as a break condition, clear LSB in the break address register (BARA/BARB) to 0. A break cannot be generated as long as this bit is set to 1. 2. If the condition is matched while a break before execution is selected, a break is generated when it is confirmed that the instruction has been fetched and it will be executed. This means this feature cannot be used on instructions fetched by overrun (instructions fetched at a branch or during an interrupt transition, but not to be executed). When this kind of break is set in the delay slot of a delayed branch instruction, the break is generated immediately before the execution of the instruction that first accepts the break. Meanwhile, a break before the execution of the instruction in a delay slot and a break after the execution of the SLEEP instruction are also prohibited. 3. When a break after execution is selected, the instruction that matches the break condition is executed and then the break is generated prior to the execution of the next instruction. As with a break before execution, this cannot be used with overrun fetch instructions. When this kind of break is set for a delayed branch instruction, a break is not generated until the first instruction at which breaks are accepted. 4. When an instruction fetch cycle is set for channel B, the break data register B (BDRB) is ignored. There is thus no need to set break data for the break of the instruction fetch cycle. 20.3.3 Break on Data Access Cycle
* The bus cycles in which L bus data access breaks occur are from instructions. * The relationship between the data access cycle address and the comparison condition for each operand size is listed in table 20.1. Table 20.1 Data Access Cycle Addresses and Operand Size Comparison Conditions
Access Size Longword Word Byte Address Compared Compares break address register bits 31 to 2 to address bus bits 31 to 2 Compares break address register bits 31 to 1 to address bus bits 31 to 1 Compares break address register bits 31 to 0 to address bus bits 31 to 0
Rev. 6.00 Jul. 15, 2009 Page 607 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
This means that when address H'00001003 is set in the break address register (BARA or BARB), for example, the bus cycle in which the break condition is satisfied is as follows (where other conditions are met). Longword access at H'00001000 Word access at H'00001002 Byte access at H'00001003 * When the data value is included in the break conditions on channel B: When the data value is included in the break conditions, either longword, word, or byte is specified as the operand size of the break bus cycle registers (BBRA and BBRB). In this case, a break is generated when the address conditions and data conditions both match. To specify byte data for this case, set the same data in two bytes at bits 15 to 8 and bits 7 to 0 of the break data register B (BDRB) and break data mask register B (BDMRB). When word or byte is set, bits 31 to 16 of BDRB and BDMRB are ignored. 20.3.4 Sequential Break
* By setting the SEQ bit in BRCR to 1, the sequential break is issued when a channel B break condition matches after a channel A break condition matches. A user break is not generated even if a channel B break condition matches before a channel A break condition matches. When channels A and B break conditions match at the same time, the sequential break is not issued. To clear the channel A condition match when a channel A condition match has occurred but a channel B condition match has not yet occurred in a sequential break specification, clear the SEQ bit in BRCR to 0. * In sequential break specification, the L- or I-bus can be selected and the execution times break condition can be also specified. For example, when the execution times break condition is specified, the break is generated when a channel B condition matches with BETR = H'0001 after a channel A condition has matched. 20.3.5 Value of Saved Program Counter (PC)
When a break occurs, PC is saved onto the stack. The PC value saved is as follows depending on the type of break. * When a break before execution is selected: The value of the program counter (PC) saved is the address of the instruction that matches the break condition. The fetched instruction is not executed, and a break occurs before it.
Rev. 6.00 Jul. 15, 2009 Page 608 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
* When a break after execution is selected: The PC value saved is the address of the instruction to be executed following the instruction in which the break condition matches. The fetched instruction is executed, and a break occurs before the execution of the next instruction. * When an address in a data access cycle is specified as a break condition: The PC value is the address of the instruction to be executed following the instruction that matched the break condition. The instruction that matched the condition is executed and the break occurs before the next instruction is executed. * When an address and data in a data access cycle are specified as a break condition: The PC value is the start address of the instruction that follows the instruction already executed when break processing started. When a data value is added to the break conditions, the break will occur before the execution of an instruction that is within two instructions of the instruction that matched the break condition. Therefore, where the break will occur cannot be specified exactly. 20.3.6 PC Trace
* Setting PCTE in BRCR to 1 enables PC traces. When branch (branch instruction, and interrupt) is generated, the branch source address and branch destination address are stored in BRSR and BRDR, respectively. * The branch source address has different values due to the kind of branch. Branch instruction The branch instruction address. Interrupt and exception The address of the instruction in which the interrupt or exception was accepted. This address is equal to the return address saved onto the stack. The start address of the interrupt or exception handling routine is stored in BRDR. The TRAPA instruction belongs to interrupt and exception above. * BRSR and BRDR have four pairs of queue structures. The top of queues is read first when the address stored in the PC trace register is read. BRSR and BRDR share the read pointer. Read BRSR and BRDR in order, the queue only shifts after BRDR is read. After switching the PCTE bit (in BRCR) off and on, the values in the queues are invalid.
Rev. 6.00 Jul. 15, 2009 Page 609 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.3.7
Usage Examples
Break Condition Specified for L Bus Instruction Fetch Cycle: * Register specifications BARA = H'00000404, BAMRA = H'00000000, BBRA = H'0054, BARB = H'00008010, BAMRB = H'00000006, BBRB = H'0054, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00300400 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00000404, Address mask: H'00000000 Bus cycle: L bus/instruction fetch (after instruction execution)/read (operand size is not included in the condition) Channel B Address: H'00008010, Address mask: H'00000006 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read (operand size is not included in the condition) A user break occurs after an instruction of address H'00000404 is executed or before instructions of addresses H'00008010 to H'00008016 are executed. * Register specifications BARA = H'00037226, BAMRA = H'00000000, BBRA = H'0056, BARB = H'0003722E, BAMRB = H'00000000, BBRB = H'0056, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00000008 Specified conditions: Channel A/channel B sequential mode Channel A Address: H'00037226, Address mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read/word Channel B Address: H'0003722E, Address mask: H'00000000 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read/word After address H'00037226 is executed, a user break occurs before an instruction of address H'0003722E is executed.
Rev. 6.00 Jul. 15, 2009 Page 610 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
* Register specifications BARA = H'00027128, BAMRA = H'00000000, BBRA = H'005A, BARB = H'00031415, BAMRB = H'00000000, BBRB = H'0054, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00300000 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00027128, Address mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/write/word The ASID check is not included. Channel B Address: H'00031415, Address mask: H'00000000 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read (operand size is not included in the condition) On channel A, no user break occurs since instruction fetch is not a write cycle. On channel B, no user break occurs since instruction fetch is performed for an even address. * Register specifications BARA = H'00037226, BAMRA = H'00000000, BBRA = H'005A, BARB = H'0003722E, BAMRB = H'00000000, BBRB = H'0056, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00000008 Specified conditions: Channel A/channel B sequential mode Channel A Address: H'00037226, Address mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/write/word Channel B Address: H'0003722E, Address mask: H'00000000 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read/word Since instruction fetch is not a write cycle on channel A, a sequential condition does not match. Therefore, no user break occurs.
Rev. 6.00 Jul. 15, 2009 Page 611 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
* Register specifications BARA = H'00000500, BAMRA = H'00000000, BBRA = H'0057, BARB = H'00001000, BAMRB = H'00000000, BBRB = H'0057, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00300001, BETR = H'0005 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00000500, Address mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read/longword The ASID check is not included. Channel B Address: H'00001000, Address mask: H'00000000 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read/longword The number of execution-times break enable (5 times) On channel A, a user break occurs before an instruction of address H'00000500 is executed. On channel B, a user break occurs after the instruction of address H'00001000 are executed four times and before the fifth time. * Register specifications BARA = H'00008404, BAMRA = H'00000FFF, BBRA = H'0054, BARB = H'00008010, BAMRB = H'00000006, BBRB = H'0054, BDRB = H'00000000, BDMRB = H'00000000, BRCR = H'00000400 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00008404, Address mask: H'00000FFF Bus cycle: L bus/instruction fetch (after instruction execution)/read (operand size is not included in the condition) Channel B Address: H'00008010, Address mask: H'00000006 Data: H'00000000, Data mask: H'00000000 Bus cycle: L bus/instruction fetch (before instruction execution)/read (operand size is not included in the condition) A user break occurs after an instruction of addresses H'00008000 to H'00008FFE is executed or before an instruction of addresses H'00008010 to H'00008016 is executed.
Rev. 6.00 Jul. 15, 2009 Page 612 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
Break Condition Specified for L Bus Data Access Cycle: * Register specifications BARA = H'00123456, BAMRA = H'00000000, BBRA = H'0064, BARB = H'000ABCDE, BAMRB = H'000000FF, BBRB = H'006A, BDRB = H'0000A512, BDMRB = H'00000000, BRCR = H'00000080 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00123456, Address mask: H'00000000, ASID = H'80 Bus cycle: L bus/data access/read (operand size is not included in the condition) Channel B Address: H'000ABCDE, Address mask: H'000000FF Data: H'0000A512, Data mask: H'00000000 Bus cycle: L bus/data access/write/word On channel A, a user break occurs with longword read from address H'00123454, word read from address H'00123456, or byte read from address H'00123456. On channel B, a user break occurs when word H'A512 is written in addresses H'000ABC00 to H'000ABCFE. Break Condition Specified for I Bus Data Access Cycle: * Register specifications: BARA = H'00314156, BAMRA = H'00000000, BBRA = H'0094, BARB = H'00055555, BAMRB = H'00000000, BBRB = H'00A9, BDRB = H'00007878, BDMRB = H'00000F0F, BRCR = H'00000080 Specified conditions: Channel A/channel B independent mode Channel A Address: H'00314156, Address mask: H'00000000, ASID = H'80 Bus cycle: I bus/instruction fetch/read (operand size is not included in the condition) Channel B Address: H'00055555, Address mask: H'00000000, ASID = H'70 Data: H'00000078, Data mask: H'0000000F Bus cycle: I bus/data access/write/byte On channel A, a user break occurs when instruction fetch is performed for address H'00314156 in the memory space. On channel B, a user break occurs when the I bus writes byte data H'7* in address H'00055555.
Rev. 6.00 Jul. 15, 2009 Page 613 of 816 REJ09B0237-0600
Section 20 User Break Controller (UBC)
20.3.8
Notes
1. The CPU reads from or writes to the UBC registers via the I bus. A desired break may not occur until the instruction to rewrite the UBC registers are executed and the actual values are reflected. In order to know the timing the UBC register is changed, read the last written register. Instructions after then are valid for the newly written register value. 2. UBC cannot monitor access to the L bus and I bus in the same channel. 3. Note on specification of sequential break: A condition match occurs when a B-channel match occurs in a bus cycle after an A-channel match occurs in another bus cycle in sequential break setting. Therefore, no break occurs even if a bus cycle, in which an A-channel match and a channel B match occur simultaneously, is set. 4. When user breaks and other exceptions occur by the same instruction, they are handled according to the priority listed in table 5.1 of section 5, Exception Handling. When an exception with a higher priority is generated, no user break occurs. A break before the execution of an instruction is accepted with a priority over other exceptions. When a break after the execution of an instruction or a data access break occurs simultaneously with a re-execution-type exception with a higher priority (including a break before the execution of an instruction), the re-execution-type exception is accepted and the condition match flag is not set (however, there is an exception as explained in 5. of section 20.3.8, Notes). When the exception source of the re-execution type is cleared by exception handling and the same instruction is executed again and completed, the break is generated again and the flag is set. When a break after the execution of an instruction or a data access break occurs simultaneously with a completion-type exception with a higher priority (TRAPA), no break occurs but the condition match flag is set. 5. Note on exception of 4. of section 20.3.8, Notes When a break after the execution of an instruction or a data access break occurs during the execution of the instruction in which a CPU address error is generated by data access, the CPU address error has a priority over the break and occurs before the break. The condition match flag is also set at this time. 6. Note when a break occurs in the delay slot When a break before the execution of an instruction is set to the delay slot instruction of the RTE instruction, the break does not occur before executing the branch destination of the RTE instruction. 7. User breaks are disabled during USB module standby mode. Do not read from or write to the UBC registers during USB module standby mode; the values are not guaranteed.
Rev. 6.00 Jul. 15, 2009 Page 614 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Section 21 User Debugging Interface (H-UDI)
This LSI incorporates a user debugging interface (H-UDI) to provide a boundary scan function and emulator support. This section describes the boundary scan function of the H-UDI. For details on emulator functions of the H-UDI, refer to the user's manual of the relevant emulator.
21.1
Features
The H-UDI is a serial I/O interface which conforms to JTAG (Joint Test Action Group, IEEE Standard 1149.1 and IEEE Standard Test Access Port and Boundary-Scan Architecture) specifications. The H-UDI in this LSI supports a boundary scan function, and is also used for emulator connection. When using an emulator, H-UDI functions should not be used. Refer to the emulator manual for the method of connecting the emulator. Figure 21.1 shows a block diagram of the H-UDI.
TDI
Shift register
SDBPR
SDBSR
SDIR
SDID
TDO
MUX
TCK TMS TRST TAP controller Decoder Local bus
[Legend] SDBPR: SDBSR: SDIR: SDID: Bypass register Boundary scan register Instruction register ID register
Figure 21.1 Block Diagram of H-UDI
Rev. 6.00 Jul. 15, 2009 Page 615 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.2
Input/Output Pins
Table 21.1 shows the pin configuration of the H-UDI. Table 21.1 Pin Configuration
Abbr. TCK Input/Output Input Description Serial Data Input/Output Clock Pin Data is serially supplied to the H-UDI from the data input pin (TDI) and output from the data output pin (TDO) in synchronization with this clock. TMS Input Mode Select Input Pin The state of the TAP control circuit is determined by changing this signal in synchronization with TCK. The protocol conforms to the JTAG standard (IEEE Std.1149.1). TRST Input Reset Input Pin Input is accepted asynchronously with respect to TCK, and when low, the H-UDI is reset. TRST must be low for the given period when the power is turned on regardless of using the HUDI function. This is different from the JTAG standard. For details on resets, see section 21.4.2, Reset Configuration. TDI Input Serial Data Input Pin Data transfer to the H-UDI is executed by changing this signal in synchronization with TCK. TDO Output Serial Data Output Pin Data read from the H-UDI is executed by reading this pin in synchronization with TCK. The data output timing depends on the command type set in SDIR. For details, see section 21.3.2, Instruction Register (SDIR). ASEMD Input ASE Mode Select Pin When a low level is input to the ASEMD pin, ASE mode is entered; if a high level is input, normal mode is entered. In ASE mode, the emulator functions can be used. The input level on the ASEMD pin should be held except during the RES pin assertion period.
Rev. 6.00 Jul. 15, 2009 Page 616 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.3
Register Descriptions
The H-UDI has the following registers. For details on the addresses of these registers and the states of these registers in each processing state, see section 24, List of Registers. * * * * Bypass register (SDBPR) Instruction register (SDIR) Boundary scan register (SDBSR) ID register (SDID) Bypass Register (SDBPR)
21.3.1
SDBPR is a 1-bit register that cannot be accessed by the CPU. When SDIR is set to the bypass mode, SDBPR is connected between H-UDI pins (TDI and TDO). The initial value is undefined. 21.3.2 Instruction Register (SDIR)
SDIR is a 16-bit read-only register. This register is in JTAG IDCODE in its initial state. It is initialized by TRST assertion or in the TAP test-logic-reset state, and can be written to by the HUDI irrespective of the CPU mode. Operation is not guaranteed if a reserved command is set in this register.
Bit 15 to 13 12 11 to 8 7 to 2 1 0 Bit Name TI7 to TI5 TI4 TI3 to TI0 Initial Value All 1 0 All 1 All 1 0 1 R/W R R R R R R Description Test Instruction 7 to 0 The H-UDI instruction is transferred to SDIR by a serial input from TDI. For commands, see table 21.2. Reserved These bits are always read as 1. Reserved This bit is always read as 0. Reserved This bit is always read as 1.
Rev. 6.00 Jul. 15, 2009 Page 617 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Table 21.2 H-UDI Commands
Bits 15 to 8 TI7 0 0 0 0 0 0 1 1 1 TI6 0 0 0 1 1 1 0 1 1 TI5 0 1 1 0 1 1 1 1 1 TI4 0 0 1 0 0 1 0 1 TI3 TI2 TI1 TI0 Description JTAG EXTEST JTAG CLAMP JTAG HIGHZ JTAG SAMPLE/PRELOAD H-UDI reset, negate H-UDI reset, assert H-UDI interrupt JTAG IDCODE (Initial value) JTAG BYPASS Reserved
Other than above
21.3.3
Boundary Scan Register (SDBSR)
SDBSR is a 333-bit shift register, located on the PAD, for controlling the input/output pins of this LSI. The initial value is undefined. This register cannot be accessed by the CPU. Using the EXTEST, SAMPLE/PRELOAD, CLAMP, and HIGHZ commands, a boundary scan test conforming to the JTAG standard can be carried out. Table 21.3 shows the correspondence between this LSI's pins and boundary scan register bits.
Rev. 6.00 Jul. 15, 2009 Page 618 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Table 21.3 External pins and Boundary Scan Register Bits
Bit Pin Name from TDI 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 306 305 304 PD06/IRQ6/RxD2/DACK1 PD05/IRQ5/TxD2/DREQ1 PD04/IRQ4/SCK1/PD03/IRQ3/RxD1/DACK0 PD02/IRQ2/TxD1/DREQ0 PD01/IRQ1/-/TEND1 PD00/IRQ0/-/TEND0 PE08/HIFCS PE24/HIFD15/CTS1/D31 PE23/HIFD14/RTS1/D30 PE22/HIFD13/CTS0/D29 PE21/HIFD12/RTS0/D28 PE20/HIFD11/SCK1/D27 PE19/HIFD10/RxD1/D26 PE18/HIFD09/TxD1/D25 PE17/HIFD08/SCK0/D24 PE16/HIFD07/RxD0/D23 PE15/HIFD06/TxD0/D22 PE14/HIFD05/-/D21 PE13/HIFD04/-/D20 PE12/HIFD03/-/D19 PE11/HIFD02/-/D18 PE10/HIFD01/-/D17 PE09/HIFD00/-/D16 PE07/HIFRS PE06/HIFWR/SIOFSYNC0/PE05/HIFRD PE04/HIFINT/TXD_SIO0/PE03/HIFMD IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN I/O Bit 303 302 301 300 299 298 297 296 295 294 293 292 291 290 289 288 287 286 285 284 283 282 281 280 279 278 277 276 275 274 Pin Name I/O
PE02/HIFDREQ/RXD_SIO0/- IN PE01/HIFRDY/SIOMCLK0/PE00/HIFEBL/SCK_SIO0/PC17/MDC/-/PC16/MDIO/-/PC15/CRS/-/PC18/LNKSTA PD06/IRQ6/RxD2/DACK1 PD05/IRQ5/TxD2/DREQ1 PD04/IRQ4/SCK1/PD03/IRQ3/RxD1/DACK0 PD02/IRQ2/TxD1/DREQ0 PD01/IRQ1/-/TEND1 PD00/IRQ0/-/TEND0 PE08/HIFCS PE24/HIFD15/CTS1/D31 PE23/HIFD14/RTS1/D30 PE22/HIFD13/CTS0/D29 PE21/HIFD12/RTS0/D28 PE20/HIFD11/SCK1/D27 PE19/HIFD10/RxD1/D26 PE18/HIFD09/TxD1/D25 PE17/HIFD08/SCK0/D24 PE16/HIFD07/RxD0/D23 PE15/HIFD06/TxD0/D22 PE14/HIFD05/-/D21 PE13/HIFD04/-/D20 PE12/HIFD03/-/D19 PE11/HIFD02/-/D18 PE10/HIFD01/-/D17 IN IN IN IN IN IN OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT
Rev. 6.00 Jul. 15, 2009 Page 619 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Bit 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242
Pin Name PE09/HIFD00/-/D16 PE07/HIFRS PE06/HIFWR/SIOFSYNC0/PE05/HIFRD PE04/HIFINT/TXD_SIO0/PE03/HIFMD
I/O OUT OUT OUT OUT OUT OUT
Bit 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210
Pin Name PE13/HIFD04/-/D20 PE12/HIFD03/-/D19 PE11/HIFD02/-/D18 PE10/HIFD01/-/D17 PE09/HIFD00/-/D16 PE07/HIFRS PE06/HIFWR/SIOFSYNC0/PE05/HIFRD PE04/HIFINT/TXD_SIO0/PE03/HIFMD
I/O Control Control Control Control Control Control Control Control Control Control
PE02/HIFDREQ/RXD_SIO0/- OUT PE01/HIFRDY/SIOMCLK0/PE00/HIFEBL/SCK_SIO0/PC17/MDC/-/PC16/MDIO/-/PC15/CRS/-/PC18/LNKSTA PD06/IRQ6/RxD2/DACK1 PD05/IRQ5/TxD2/DREQ1 PD04/IRQ4/SCK1/PD03/IRQ3/RxD1/DACK0 PD02/IRQ2/TxD1/DREQ0 PD01/IRQ1/-/TEND1 PD00/IRQ0/-/TEND0 PE08/HIFCS PE24/HIFD15/CTS1/D31 PE23/HIFD14/RTS1/D30 PE22/HIFD13/CTS0/D29 PE21/HIFD12/RTS0/D28 PE20/HIFD11/SCK1/D27 PE19/HIFD10/RxD1/D26 PE18/HIFD09/TxD1/D25 PE17/HIFD08/SCK0/D24 PE16/HIFD07/RxD0/D23 PE15/HIFD06/TxD0/D22 PE14/HIFD05/-/D21 OUT OUT OUT OUT OUT OUT Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control
PE02/HIFDREQ/RXD_SIO0/- Control PE01/HIFRDY/SIOMCLK0/PE00/HIFEBL/SCK_SIO0/PC17/MDC/-/PC16/MDIO/-/PC15/CRS/ PC18/LNKSTA PC09/RX_ER/-/PC08/RX_DV/-/PC00/MIIRXD0/-/PC01/MIIRXD1/-/PC02/MIIRXD2/-/PC03/MIIRXD3/-/PC10/RX_CLK/-/PC11/TX_ER/-/PC13/TX_CLK/-/PC04/MIITXD0/-/SPEED100 PC05/MIITXD1/-/LINK PC06/MIITXD2/-/CRS PC07/MIITXD3/-/DUPLEX PC12/TX_EN/-/PC14/COL/-/Control Control Control Control Control Control IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN
Rev. 6.00 Jul. 15, 2009 Page 620 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Bit 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178
Pin Name PC20/WOL PC19/EXOUT MD3 MD5 TESTMD PC09/RX_ER/-/PC08/RX_DV/-/PC00/MIIRXD0/-/PC01/MIIRXD1/-/PC02/MIIRXD2/-/PC03/MIIRXD3/-/PC10/RX_CLK/-/PC11/TX_ER/-/PC13/TX_CLK/-/PC04/MIITXD0/-/SPEED100 PC05/MIITXD1/-/LINK PC06/MIITXD2/-/CRS PC07/MIITXD3/-/DUPLEX PC12/TX_EN/-/PC14/COL/-/PC20/WOL PC19/EXOUT TESTOUT PC09/RX_ER/-/PC08/RX_DV/-/PC00/MIIRXD0/-/PC01/MIIRXD1/-/PC02/MIIRXD2/-/PC03/MIIRXD3/-/PC10/RX_CLK/-/PC11/TX_ER/-/PC13/TX_CLK/-/-
I/O IN IN IN IN IN OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT Control Control Control Control Control Control Control Control Control
Bit 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146
Pin Name PC04/MIITXD0/-/SPEED100 PC05/MIITXD1/-/LINK PC06/MIITXD2/-/CRS PC07/MIITXD3/-/DUPLEX PC12/TX_EN/-/PC14/COL/-/PC20/WOL PC19/EXOUT TESTOUT MD0 NMI MD1 MD2 D00 D01 D02 D03 D04 D05 D06 D07 D15 D14 D13 D12 D11 D10 D09 D08 PB02/CKE PB03/CAS PB04/RAS
I/O Control Control Control Control Control Control Control Control Control IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN
Rev. 6.00 Jul. 15, 2009 Page 621 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Bit 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116
Pin Name D00 D01 D02 D03 D04 D05 D06 D07 D15 D14 D13 D12 D11 D10 D09 D08 WE0, DQMLL WE1, DQMLU, WE RDWR PB02/CKE PB03/CAS PB04/RAS D00 D01 D02 D03 D04 D05 D06 D07
I/O OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT Control Control Control Control Control Control Control Control
Bit 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86
Pin Name D15 D14 D13 D12 D11 D10 D09 D08 WE0, DQMLL WE1, DQMLU, WE RDWR PB02/CKE PB03/CAS PB04/RAS PB12/CS3 PB13/BS PB11/CS4 PB00/WAIT PB05/WE2(BE2)/DQMUL/ ICIORD PB06/WE3(BE3)/DQMUU/ ICIOWR PB01/IOIS16 PB09/CE2A PB10/CS5B, CE1A PB07/CE2B PB08/CS6B, CE1B PA16/A16 PA17/A17 PA18/A18 PA19/A19 PA20/A20
I/O Control Control Control Control Control Control Control Control Control Control Control Control Control Control IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN
Rev. 6.00 Jul. 15, 2009 Page 622 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Bit 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57
Pin Name PA21/A21/SCK_SIO0/PA22/A22/SIOMCLK0/PA23/A23/RXD_SIO0/PA24/A24/TXD_SIO0/PA25/A25/SIOFSYNC0/PD07/IRQ7/SCK2/PB12/CS3 A00 A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11 A12 A13 A14 A15 PB13/BS CS0 PB11/CS4 RD PB00/WAIT PB05/WE2(BE2)/DQMUL/ ICIORD
I/O IN IN IN IN IN IN OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT
Bit 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28
Pin Name PB06/WE3(BE3)/DQMUU/ ICIOWR PB01/IOIS16 PB09/CE2A PB10/CS5B, CE1A PB07/CE2B PB08/CS6B, CE1B PA16/A16 PA17/A17 PA18/A18 PA19/A19 PA20/A20 PA21/A21/SCK_SIO0/PA22/A22/SIOMCLK0/PA23/A23/RXD_SIO0/PA24/A24/TXD_SIO0/PA25/A25/SIOFSYNC0/PD07/IRQ7/SCK2/PB12/CS3 A00 A01 A02 A03 A04 A05 A06 A07 A08 A09 A10
I/O OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT OUT Control Control Control Control Control Control Control Control Control Control Control Control
Rev. 6.00 Jul. 15, 2009 Page 623 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Bit 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 Note:
Pin Name A11 A12 A13 A14 A15 PB13/BS CS0 PB11/CS4 RD PB00/WAIT PB05/WE2(BE2)/ DQMUL/ICIORD PB06/WE3(BE3)/ DQMUU/ICIOWR PB01/IOIS16 PB09/CE2A PB10/CS5B, CE1A *
I/O Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control
Bit 12 11 10 9 8 7 6 5 4 3 2 1 0
Pin Name PB07/CE2B PB08/CS6B, CE1B PA16/A16 PA17/A17 PA18/A18 PA19/A19 PA20/A20 PA21/A21/SCK_SIO0/PA22/A22/SIOMCLK0/PA23/A23/RXD_SIO0/PA24/A24/TXD_SIO0/PA25/A25/SIOFSYNC0/PD07/IRQ7/SCK2/to TDO
I/O Control Control Control Control Control Control Control Control Control Control Control Control Control
Control means a low active signal. The corresponding pin is driven with an OUT value when the Control is driven low.
Rev. 6.00 Jul. 15, 2009 Page 624 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.3.4
ID Register (SDID)
SDID is a 32-bit read-only register in which SDIDH and SDIDL are connected. Each register is a 16-bit that can be read by the CPU. To read this register by the H-UDI side, the contents can be read via the TDO pin when the IDCODE command is set and the TAP state is Shift-DR. Writing is disabled.
Bit 31 to 0 Bit Name DID31 to DID0 Initial Value R/W Description Device ID 31 to Device ID 0 ID register that is stipulated by JTAG. H'0800C447 (initial value) for this LSI. Upper four bits may be changed according to the LSI version. SDIDH corresponds to bits 31 to 16. SDIDL corresponds to bits 15 to 0.
Refer to R description
Rev. 6.00 Jul. 15, 2009 Page 625 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.4
21.4.1
Operation
TAP Controller
Figure 21.2 shows the internal states of the TAP controller. State transitions basically conform to the JTAG standard.
1
Test-logic-reset 0 1 1 Select-DR-scan 0 0 1 Capture-DR 0 Shift-DR 1 1 Exit1-DR 0 Pause-DR 1 0 Exit2-DR 1 Update-DR 1 0 0 0 Exit2-IR 1 Update-IR 1 0 Exit1-IR 0 Pause-IR 1 0 0 1 Capture-IR 0 Shift-IR 1 1 0 Select-IR-scan 1
0
Run-test/idle
Figure 21.2 TAP Controller State Transitions Note: The transition condition is the TMS value at the rising edge of the TCK signal. The TDI value is sampled at the rising edge of the TCK signal and is shifted at the falling edge of the TCK signal. For details on change timing of the TDO value, see section 21.4.3, TDO Output Timing. The TDO pin is high impedance, except in the shift-DR and shift-IR states. A transition to the Test-Logic-Reset state is made asynchronously with TCK by driving the TRST signal 0.
Rev. 6.00 Jul. 15, 2009 Page 626 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.4.2
Reset Configuration
Table 21.4 Reset Configuration
ASEMD*1 High RES Low TRST Low High High Low High Low Low Low High High Low High LSI State Normal reset and H-UDI reset Normal reset H-UDI reset only Normal operation Reset hold*2 Normal reset H-UDI reset only Normal operation
Notes: 1. Selects to normal mode or ASE mode. ASEMD0 = high: normal mode ASEMD0 = low: ASE mode 2. In ASE mode, the reset hold state is entered by driving the RES and TRST pins low for the given time. In this state, the CPU does not start up, even if the RES pin is driven high. After that, when the TRST pin is driven high, H-UDI operation is enabled, but the CPU does not start up. The reset hold state is canceled by the following: another RES assert (power-on reset) or TRST reassert.
21.4.3
TDO Output Timing
The timing of data output from the TDO differs according to the command type set in SDIR. The timing changes at the TCK falling edge when JTAG commands (EXTEST, CLAMP, HIGHZ, SAMPLE/PRELOAD, IDCODE, and BYPASS) are set. This is a timing of the JTAG standard. When the H-UDI commands (H-UDI reset negate, H-UDI reset assert, and H-UDI interrupt) are set, the TDO signal is output at the TCK rising edge earlier than the JTAG standard by a half cycle.
Rev. 6.00 Jul. 15, 2009 Page 627 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
TCK
TDO (when the H-UDI command is set) TDO (when the JTAG command is set)
tTDO
tTDO
Figure 21.3 H-UDI Data Transfer Timing 21.4.4 H-UDI Reset
An H-UDI reset is generated by setting the H-UDI reset assert command in SDIR. An H-UDI reset is of the same kind as a power-on reset. An H-UDI reset is released by inputting the H-UDI reset negate command. The required time between the H-UDI reset assert command and H-UDI reset negate command is the same as time for keeping the RESETP pin low to apply a power-on reset.
SDIR
H-UDI reset assert
H-UDI reset negate
LSI internal reset
CPU state
Branch to H'A0000000
Figure 21.4 H-UDI Reset 21.4.5 H-UDI Interrupt
The H-UDI interrupt function generates an interrupt by setting an H-UDI command in SDIR. An H-UDI interrupt is an interrupt of general exceptions, resulting in a branch to an address based on the VBR value plus offset, and with return by the RTE instruction. This interrupt request has a fixed priority level of 15. H-UDI interrupts are accepted in sleep mode, but not in standby mode.
Rev. 6.00 Jul. 15, 2009 Page 628 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
21.5
Boundary Scan
A command can be set in SDIR by the H-UDI to place the H-UDI pins in boundary scan mode stipulated by JTAG. 21.5.1 Supported Instructions
This LSI supports the three mandatory instructions defined in the JTAG standard (BYPASS, SAMPLE/PRELOAD, and EXTEST) and three option instructions (IDCODE, CLAMP, and HIGHZ). BYPASS: The BYPASS instruction is a mandatory instruction that operates the bypass register. This instruction shortens the shift path to speed up serial data transfer involving other chips on the printed circuit board. While this instruction is executing, the test circuit has no effect on the system circuits. The upper four bits of the instruction code are 1111. SAMPLE/PRELOAD: The SAMPLE/PRELOAD instruction inputs data from this LSI's internal circuitry to the boundary scan register, outputs data from the scan path, and loads data onto the scan path. While this instruction is executed, signals input to this LSI pins are transmitted directly to the internal circuitry, and internal circuit outputs are directly output externally from the output pins. This LSI's system circuits are not affected by execution of this instruction. The upper four bits of the instruction code are 0100. In a SAMPLE operation, a snapshot of a value to be transferred from an input pin to the internal circuitry, or a value to be transferred from the internal circuitry to an output pin, is latched into the boundary scan register and read from the scan path. Snapshot latching is performed in synchronization with the rising edge of the TCK signal in the Capture-DR state. Snapshot latching does not affect normal operation of this LSI. In a PRELOAD operation, an initial value is set in the parallel output latch of the boundary scan register from the scan path prior to the EXTEST instruction. Without a PRELOAD operation, when the EXTEST instruction was executed an undefined value would be output from the output pin until completion of the initial scan sequence (transfer to the output latch) (with the EXTEST instruction, the parallel output latch value is constantly output to the output pin). EXTEST: This instruction is provided to test external circuitry when this LSI is mounted on a printed circuit board. When this instruction is executed, output pins are used to output test data (previously set by the SAMPLE/PRELOAD instruction) from the boundary scan register to the printed circuit board, and input pins are used to latch test results into the boundary scan register from the printed circuit board. If testing is carried out by using the EXTEST instruction N times, the Nth test data is scanned-in when test data (N-1) is scanned out.
Rev. 6.00 Jul. 15, 2009 Page 629 of 816 REJ09B0237-0600
Section 21 User Debugging Interface (H-UDI)
Data loaded into the output pin boundary scan register in the Capture-DR state is not used for external circuit testing (it is replaced by a shift operation). The upper four bits of the instruction code are 0000. IDCODE: A command can be set in SDIR by the H-UDI pins to place the H-UDI pins in the IDCODE mode stipulated by JTAG. When the H-UDI is initialized (TRST is asserted or TAP is in the Test-Logic-Reset state), the IDCODE mode is entered. CLAMP, HIGHZ: A command can be set in SDIR by the H-UDI pins to place the H-UDI pins in the CLAMP or HIGHZ mode stipulated by JTAG. 21.5.2 Points for Attention
* Boundary scan mode does not cover clock-related system signals (EXTAL, XTAL, CKIO, and CK_PHY), E10A-related signals (RES and ASEMD), and H-UDI-related signals (TCK, TDI, TDO, TMS, and TRST). * When the EXTEST, CLAMP, and HIGHZ commands are set, fix the RES pin low. * When a boundary scan test for other than BYPASS and IDCODE is carried out, fix the ASEMD pin high.
21.6
Usage Notes
* An H-UDI command, once set, will not be modified as long as another command is not reissued from the H-UDI. If the same command is given continuously, the command must be set after a command (BYPASS, etc.) that does not affect LSI operations is once set. * Because LSI operations are suspended in standby mode, H-UDI commands are not accepted. To hold the state of the TAP before and after standby mode, the TCK signal must be high during standby mode transition. * The H-UDI is used for emulator connection. Therefore, H-UDI functions cannot be used when using an emulator.
Rev. 6.00 Jul. 15, 2009 Page 630 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Section 22 Ethernet Physical Layer Transceiver (PHY)
This LSI has an on-chip PHY module.
22.1
Features
* Fully-integrated IEEE 802.3/802.3u compliant 10/100Mbps Ethernet PHY * PHY clock = 25 MHz, 3.3 V Analog power supply. * Integrated DSP with adaptive-equalizer and Baseline Wander (BLW) correction High immunity to crosstalk * Link-configuration automatically determined by Auto-negotiation / parallel detection; manual configuration also available * Low power consumption * Half- and Full-duplex capable for both 10 and 100 Mbps links * Automatic Polarity Correction in 10Base-T * Extended cable length option in 10Base-T * MII interface to the CPU core of this LSI. * Serial Management Interface (SMI) * Link, Activity, Duplex and Speed LED outputs
Rev. 6.00 Jul. 15, 2009 Page 631 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Figure 22.1 shows the block diagram around the PHY module.
CPU
This LSI
Outside LSI
Internal bus
PHY-IF MII ETC (Ether C) TX-ER MII_TXD3 MII_TXD2 MII_TXD1 MII_TXD0 TX-EN TX-CLK MDC MDIO MDI_DIR MII_RXD3 MII_RXD2 MII_RXD1 MII_RXD0 RX-CLK CRS COL RX-DV RX-ER PHY Tx/Rx CO_TX_ER CO_MII_TXD3 CO_MII_TXD2 CO_MII_TXD1 CO_MII_TXD0 CO_TX_EN CO_TX_CLK CO_MDC CO_MDI CO_MDO CO_MDIO_DIR CO_MII_RXD3 CO_MII_RXD2 CO_MII_RXD1 CO_MII_RXD0 CO_RX_CLK CO_CRS CO_COL CO_RX_DV CO_RX_ER LED (_CRS) LED (_LINK) LED (_SPEED100) LED (_FULL-DUPLEX) Magnetics CAT5
Figure 22.1 The Block Diagram around PHY Module
Rev. 6.00 Jul. 15, 2009 Page 632 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.2
Pin Configuration
PHY module has below pins. Table 22.1 Pin Configuration
Pin Name Analog power supply 1 for PHY Analog power supply 2 for PHY Analog power supply 3 for PHY Abbreviation Vcc1A Vcc2A Vcc3A I/O Input Input Input Input Input Input Function Analog power supply for PHY Analog power supply for PHY Analog power supply for PHY Analog ground for PHY Analog ground for PHY For providing the external clock for PHY. Of course you can provide a clock from internal clock pulse generator (CPG), but you have to pull up or down this pin in that case. The differential transmit output (+) from PHY to Ethernet network The differential transmit output (-) from PHY to Ethernet network The differential receive input (+) from Ethernet network to PHY The differential receive input (-) from Ethernet network to PHY SPEED100 Output Low shows that the operating speed is 100 Mbit/s or during Auto negotiation LINK Output (Low indicates that link is on.) CRS Output (Low indicates that there is CRS (carrier sense), keeps low after inactivation of CRS about 128 ms.) DUPLEX Output (Low indicates FULL DUPLEX)
Analog ground 1 for PHY Vss1A Analog ground 2 for PHY Vss2A PHY clock CK_PHY
Differential transmit output (+) Differential transmit output (-)
TxP TxM
Output Output Input Input Output
Differential receive input RxP (+) Differential receive input RxM (-) SPEED100 signal SPEED100
LINK signal CRS signal
LINK CRS
Output Output
DUPLEX signal
DUPLEX
Output
Rev. 6.00 Jul. 15, 2009 Page 633 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Pin Name Reference resistor Test input/output
Abbreviation EXRES1 TSTBUSA
I/O Input I/O
Function Connect to the ground through a resistor of value 12.4Kohm, 1%. I/O for test. Do not connect anything to this pin.
22.3
Top Level Functional Architecture
Functionally, this PHY module can be divided into the following sections: * * * * * 100Base-TX transmit and receive 10Base-T transmit and receive MII interface to the on-chip EtherC of this LSI Auto-negotiation to automatically determine the best speed and duplex possible Management Control to read status registers and write control register.
10M Tx logic
10M Transmitter 100M Transmitter To magnetics
100M Tx Logic MII logic Transmit
MII bus
100M Rx Logic
DSP system: clock data recovery Equalizer
A/D
100M PLL 10M Rx Logic Squelch and Filters From magnetics
Receive Auto-negotiation Central Bias
10M PLL
SMI
Management control
= Analog blocks
Figure 22.2 Architectural Overview
Rev. 6.00 Jul. 15, 2009 Page 634 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.4
PHY Management Control
The Management Control module includes 2 blocks: * Serial Management Interface (SMI) * Management Registers Set 22.4.1 Serial Management Interface (SMI)
The Serial Management Interface is used to control this PHY core and obtain its status. This interface supports registers 0 through 6 as required by Clause 22 of the IEEE802.3 standard. Nonsupported registers (7 to 15) will be read as hexadecimal "FFFF". At the system level there are 2 signals, MDIO and MDC where MDIO is bi-directional open-drain and MDC is the clock. In the core there is no notion of bi-directional signals so the MDIO signal is implemented as 3 signals: CO_MDIO_DIR, CO_MDO and CO_MDI. The relationship among these signals is made clear in figure 22.3.
CO_MDIO_DIR ENB CO_MDO CO_MDI PHY module side
MDIO EtherC side Inside of this LSI
Note: Drivers are in open-drain state
Figure 22.3 How to Derive MDIO Signal from Core Signals The CO_MDC signal is an a-periodic clock provided by the station management controller (SMC), part of the EtherC. The CO_MDI signal receives serial data (commands) from the controller SMC. The CO_MDO sends serial data (status) to the SMC. The minimum time between edges of the CO_MDC is 160 ns. There is no maximum time between edges. The minimum cycle time (time between two consecutive rising or two consecutive falling edges) is 400 ns. These modest timing requirements allow this interface to be easily driven by the CPU.
Rev. 6.00 Jul. 15, 2009 Page 635 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
The data on the CO_MDO and CO_MDI lines is latched on the rising edge of the CO_MDC. The frame structure and timing of the data is shown in figure 22.4 and figure 22.5.
Output on the rising edge Latch on the rising edge
CO_MDC CO_MDI CO_MDIO_DIR CO_MDO
Preamble Start of Frame OP Code PHY Address Register Address Turn Around
D15 D14
...
32 1's 0 1 1 0 A4 A3 A2 A1 A0 R4 R3 R2 R1 R0
...
Data
D1
D0
Figure 22.4 MDIO Timing and Frame Structure (READ Cycle)
Output on the rising edge Latch on the rising edge
CO_MDC CO_MDI CO_MDIO_DIR CO_MDO
Preamble Start of Frame OP Code PHY Address Register Address Turn Around
32 1's
0
1
0
1
A4 A3 A2 A1
A0 R4 R3 R2 R1 R0
D15 D14
... ...
Data
D1
D0
Figure 22.5 MDIO Timing and Frame Structure (WRITE Cycle) Shown below is an example of coding for MDC cycles implemented by software loops. Note: CO_MDIO_DIR in figures 22.4 and 22.5 above has a reverse polarity in relation to the MMD bit in the PIR register.
Rev. 6.00 Jul. 15, 2009 Page 636 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
/* SMI register read */ unsigned short { unsigned short data; ether_reg_read( unsigned short reg_addr )
phy_preamble(); phy_reg_set( reg_addr, PHY_READ ); phy_ta_z0(); phy_reg_read( &data ); mii_idle(); return( data ); }
/* SMI register write */ void { phy_preamble(); phy_reg_set( reg_addr, PHY_WRITE ); phy_ta_10(); phy_reg_write( data ); mii_idle(); } ether_reg_write( unsigned short reg_addr, unsigned short data )
/* Subroutines */ void { long i; phy_preamble( void )
i = 32; while( i > 0 ) { mii_write_1(); i--; }
Rev. 6.00 Jul. 15, 2009 Page 637 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
}
void { long
phy_reg_set( unsigned short reg_addr, long option )
i; data;
unsigned short
data = 0; data = (PHY_ST << 14); if( option == PHY_READ ) { data |= (PHY_READ << 12); } else { data |= (PHY_WRITE << 12); /* OP code(WT) } data |= (PHY_ADDR << 7); /* PHY Address data |= (reg_addr << 2); /* Reg Address */ */ */ /* OP code(RD) */ /* ST code */
i = 14; while( i > 0 ) { if( (data & 0x8000) == 0 ) { mii_write_0(); } else { mii_write_1(); } data <<= 1; i--; } }
Rev. 6.00 Jul. 15, 2009 Page 638 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
#define QuatA 6 // =25cyc/4 void { long long i; j;
(Please define to keep, "MDC cycle > 400ns")
phy_reg_read( unsigned short *data )
unsigned short
reg_data;
reg_data = 0; i = 16;
//Preceding TA cycle set PIR 0x00000000 while( i > 0 ) { for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001; reg_data <<= 1; reg_data |= (REG_PIR & 0x00000008) >> 3; /* MDI read*/
for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000; i--; } *data = reg_data; }
void { long
phy_reg_write( unsigned short data )
i;
i = 16; while( i > 0 ) { if( (data & 0x8000) == 0 ) { mii_write_0();
Rev. 6.00 Jul. 15, 2009 Page 639 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
} else { mii_write_1(); } i--; data <<= 1; } }
void {
phy_ta_z0( void )
mii_idle(); mii_idle(); }
void {
phy_ta_10( void )
mii_write_1(); mii_write_0(); }
/* Output 1 */ void { int j; unsigned short pre_data; mii_write_1( void )
Rev. 6.00 Jul. 15, 2009 Page 640 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
pre_data = REG_PIR&0x00000006; /* MDO,MMD */ for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000 | pre_data; //line 1
Example of corresponding waveforms
line 1 line 2 line 3 line 4
MDC
for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001 | pre_data; //line 2 for (j=1;j<=QuatA;j++) REG_PIR = 0x00000007; //line 3 for (j=1;j<=QuatA;j++) REG_PIR = 0x00000006; //line 4 } /* Output 0 */ void { int j; unsigned short pre_data; mii_write_0( void )
MDO
pre_data
1
pre_data = REG_PIR&0x00000006; /* MDO,MMD */ for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000 | pre_data; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001 | pre_data; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000003; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000002; } /* Idle cycle */ void { int j; unsigned short pre_data; mii_idle( void )
pre_data = REG_PIR&0x00000006; /* MDO,MMD */ for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000 | pre_data; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001 | pre_data; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000001; for (j=1;j<=QuatA;j++) REG_PIR = 0x00000000; }
Rev. 6.00 Jul. 15, 2009 Page 641 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.4.2
SMI Register Mapping
The following registers are supported (register numbers are in decimal):
Register # 0 1 2 3 4 5 6 Description Basic Control Register Basic Status Register PHY Identifier 1 PHY Identifier 2 Auto-Negotiation Advertisement Register Auto-Negotiation Link Partner Ability Register Auto-Negotiation Expansion Register Group Basic Basic Extended Extended Extended Extended Extended
* SMI Register Format The mode key is as follows: RW = read/write, SC = self clearing, WO = write only, RO = read only LH = latch high, clear on read of register LL = latch low, clear on read of register NASR = Not Affected by Software Reset (n,m) = register n, bit m
Rev. 6.00 Jul. 15, 2009 Page 642 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Register 0 (Basic Control)
Address Name 0.15 0.14 0.13 Reset Loopback Description 1 = software reset. This bit is self-clearing. With this LSI, do not use this bit. 1 = loopback mode, 0 = normal operation RW RW 0 Set by co_st_mode [2:0] of PHYIFCR Set by co_st_mode [2:0] of PHYIFCR 0 Set by co_st_mode [2:0] of PHYIFCR Mode Default
RW/SC 0
Speed Select 1 = 100Mbps, 0 = 10Mbps. Ignored if Auto Negotiation is enabled (0.12 = 1).
0.12
AutoNegotiation Enable
1 = enable auto-negotiate process (overrides RW 0.13 and 0.8), 0 = disable auto-negotiate process
0.11 0.10
Power Down 1 = General power down mode, 0 = normal operation Isolate Reserved. (0= normal operation)The write value should always be 0.
RW RW
0.9 0.8
Restart Auto- 1 = restart auto-negotiate process, 0 = normal Negotiate operation. Bit is self-clearing. Duplex Mode 1 = full duplex, 0 = half duplex . Ignored if Auto Negotiation is enabled (0.12 = 1).
RW/SC 0 RW Set by co_st_mode [2:0] of PHYIFCR 0 0
0.7 0.6:0
Collision Test 1 = enable COL test, 0 = disable COL test Reserved The write value should always be 0.
RW RO
Rev. 6.00 Jul. 15, 2009 Page 643 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Register 1 (Basic Status)
Address 1.15 Name 100Base-T4 Description Mode Default 0
This bit indicates that T4 is available or not, but RO this module has no capability of T4 and it is fixed to 0.The write value should always be 0. 1 = TX with full duplex, 0 = no TX full duplex ability 1 = TX with half duplex, 0 = no TX half duplex ability RO RO RO RO RO RO
1.14 1.13 1.12 1.11 1.10:6 1.5
100Base-TX Full Duplex 100Base-TX Half Duplex
1 1 1 1 0 0
10Base-T Full 1 = 10Mbps with full duplex, 0 = no 10Mbps Duplex with full duplex ability 10Base-T Half 1 = 10Mbps with half duplex, 0 = no 10Mbps Duplex with half duplex ability Reserved AutoNegotiate Complete The write value should always be 0. 1 = auto-negotiate process completed, 0 = auto-negotiate process not completed
1.4 1.3
Remote Fault 1 = remote fault condition detected, 0 = no remote fault AutoNegotiate Ability Link Status
RO/LH
0 1
1 = able to perform auto-negotiation function, RO 0 = unable to perform auto-negotiation function 1 = link is up, 0 = link is down RO/LL RO/LH RO
1.2 1.1 1.0
0 0 1
Jabber Detect 1 = jabber condition detected, 0 = no jabber condition detected Extended Capabilities 1 = supports extended capabilities registers, 0 = does not support extended capabilities registers
* Register 2 (PHY Identifier 1)
Address 2.15:0 Name PHY ID Number Description Assigned to the 3rd through 18th bits of the Organizationally Unique Identifier (OUI), respectively. Mode RW Default co_reg2_oui_in [15:0] of PHYIFSMIR2
Rev. 6.00 Jul. 15, 2009 Page 644 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Register 3 (PHY Identifier 2)
Address 3.15:10 3.9:4 3.3:0 Name PHY ID Number b Model Number Revision Number Description Assigned to the 19th through 24th bits of the OUI. Six bit manufacturer's model number. Four bit manufacturer's revision number. Mode RW RW RW Default co_reg3_oui_ in[15:0] of PHYIFSMIR3
* Register 4 (Auto Negotiation Advertisement)
Address 4.15 Name Next Page Description Mode Default 0
This bit indicates next page is available or RO not, but this core does not support next page ability and it is fixed to 0.The write value should always be 0. The write value should always be 0. RO RW R/W R/W
4.14 4.13 4.12 4.11:10
Reserved
0 0 0 00
Remote Fault 1 = remote fault detected, 0 = no remote fault Reserved Pause Operation The write value should always be 0. 00 No PAUSE, 01 Asymmetric PAUSE toward link partner, 10 Symmetric PAUSE, 11 Both Symmetric PAUSE and Asymmetric PAUSE toward local device
4.9 4.8
100Base-T4
Reserved. The write value should always RO be 0. RW
0 Set by co_st_mode [2:0] of PHYIFCR 1 Set by co_st_mode [2:0] of PHYIFCR
100Base-TX 1 = TX with full duplex, 0 = no TX full Full Duplex duplex ability
4.7 4.6
100Base-TX 1 = TX able, 0 = no TX ability 10Base-T Full Duplex 1 = 10Mbps with full duplex, 0 = no 10Mbps with full duplex ability
RW RW
Rev. 6.00 Jul. 15, 2009 Page 645 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Address 4.5
Name 10Base-T
Description 1 = 10Mbps able, 0 = no 10Mbps ability
Mode RW
Default Set by co_st_mode [2:0] of PHYIFCR 00001
4.4:0
Selector Field
[00001] = IEEE 802.3
RW
* Register 5 (Auto Negotiation Link Partner Ability)
Address 5.15 Name Next Page Description 1 = next page capable 0 = no next page ability. This part does not support next page ability. 1 = link code word received from partner 0 = link code word not yet received 5.13 5.12:11 5.10 Remote Fault Reserved Pause Operation 1 = remote fault detected 0 = no remote fault The write value should always be 0. 1 = Pause Operation is supported by remote MAC 0 = Pause Operation is not supported by remote MAC 1 = T4 able, 0 = no T4 ability 1 = TX with full duplex 0 = no TX full duplex ability 1 = TX able, 0 = no TX ability 1 = 10Mbps with full duplex 0 = no 10Mbps with full duplex ability 1 = 10Mbps able 0 = no 10Mbps ability [00001] = IEEE 802.3 RO RO RO 0 0 0 Mode RO Default 0
5.14
Acknowledge
RO
0
5.9 5.8 5.7 5.6 5.5 5.4:0
100Base-T4 100Base-TX Full Duplex 100Base-TX 10Base-T Full Duplex 10Base-T Selector Field
RO RO RO RO RO RO
0 0 0 0 0 00001
Rev. 6.00 Jul. 15, 2009 Page 646 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Register 6 (Auto Negotiation Expansion)
Address 6.15:5 6.4 Name Reserved Parallel Detection Fault Link Partner Next Page Able Next Page Able Page Received Link Partner AutoNegotiation Able Description The write value should always be 0. 1 = fault detected by parallel detection logic 0 = no fault detected by parallel detection logic 1 = link partner has next page ability 0 = link partner does not have next page ability 1 = local device has next page ability 0 = local device does not have next page ability 1 = new page received 0 = new page not yet received 1 = link partner has auto-negotiation ability, 0 = link partner does not have auto-negotiation ability RO 0 RO/LH 0 RO 0 RO 0 Mode RO RO/LH Default 0 0
6.3
6.2 6.1 6.0
Rev. 6.00 Jul. 15, 2009 Page 647 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.5
100Base-TX Transmit
The data path of the 100Base-TX is shown in figure 22.6. Each major block is explained below.
CO_TX_CLK (for MII) MAC (Ether C)
100 M PLL
MII 25 MHz by 4 bits
MII
25 MHz by 4 bits
4B/5B encoder
25 MHz by 5 bits
Scrambler and PISO
125 Mbps Serial
NRZI converter
NRZI
MLT-3 converter
Tx driver MLT-3 MLT-3
Magnetics
MTL-3 RJ 45 CAT-5 Shaded blocks are part of the PHY core
MLT-3
Figure 22.6 100Base-TX Data Path (1) 100M Transmit Data across the MII
The MAC controller drives the transmit data onto the CO_MII_TXD bus and asserts the internal signal (CO_TX_EN) to indicate valid data. The data is latched by the PHY's MII block on the rising edge of CO_TX_CLK. The data is in the form of 4-bit wide 25MHz data. (2) 4B/5B Encoding
The transmit data passes from the MII block to the 4B/5B encoder. This block encodes the data from 4-bit nibbles to 5-bit symbols (known as "code-groups") according to table 22.2. Each 4-bit data-nibble is mapped to 16 of the 32 possible code-groups. The remaining 16 code-groups are either used for control information or are not valid. The first 16 code-groups are referred to by the hexadecimal values of their corresponding data nibbles, 0 through F. The remaining code-groups are given letter designations with slashes on either side. For example, an IDLE code-group is /I/, a transmit error code-group is /H/, etc.
Rev. 6.00 Jul. 15, 2009 Page 648 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Table 22.2 4B/5B Code Table
CODE GROUP 11110 01001 10100 10101 01010 01011 01110 01111 10010 10011 10110 10111 11010 11011 11100 11101 11111 11000 10001 01101 RECEIVER INTERPRETATION (CO_MII_RXD) 0 1 2 3 4 5 6 7 8 9 A B C D E F IDLE First nibble of SSD, translated to "0101" following IDLE, else CO_RX_ER Second nibble of SSD, translated to "0101" following J, else CO_RX_ER First nibble of ESD, causes de-assertion of CRS if followed by /R/, else assertion of CO_RX_ER 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 DATA 0 DATA 1 DATA 2 DATA 3 DATA 4 DATA 5 DATA 6 DATA 7 DATA 8 DATA 9 DATA A DATA B DATA C DATA D DATA E DATA F Sent after /T/R/ until CO_TX_EN Sent for rising CO_TX_EN Sent for rising CO_TX_EN Sent for falling CO_TX_EN TRANSMITTER INTERPRETATION (CO_MII_TXD)
SYM 0 1 2 3 4 5 6 7 8 9 A B C D E F I J K T
00111
R
Second nibble of ESD, causes deassertion of Sent for falling CO_TX_EN CRS if following /T/, else assertion of CO_RX_ER Transmit Error Symbol INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV Sent for rising CO_TX_ER INVALID INVALID INVALID
00100 00110 11001 00000
H V V V
Rev. 6.00 Jul. 15, 2009 Page 649 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
CODE GROUP 00001 00010 00011 00101 01000 01100 10000
SYM V V V V V V V
RECEIVER INTERPRETATION (CO_MII_RXD) INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV INVALID, CO_RX_ER if during CO_RX_DV
TRANSMITTER INTERPRETATION (CO_MII_TXD) INVALID INVALID INVALID INVALID INVALID INVALID INVALID
(3)
Scrambling
Repeated data patterns (especially the IDLE code-group) can have power spectral densities with large narrow-band peaks. Scrambling the data helps eliminate these peaks and spread the signal power more uniformly over the entire channel bandwidth. This uniform spectral density is required by FCC regulations to prevent excessive EMI from being radiated by the physical routing. The seed for the scrambler is generated from the PHY address. The scrambler also performs the Parallel In Serial Out conversion (PISO) of the data. (4) NRZI and MLT3 Encoding
The scrambler block passes the 5-bit wide parallel data to the NRZI converter where it becomes a serial 125MHz NRZI data stream. The NRZI is encoded to MLT-3. MLT3 is a tri-level code where a change in the logic level represents a code bit "1" and the logic output remaining at the same level represents a code bit "0". (5) 100M Transmit Driver
The MLT3 data is then passed to the analog transmitter, which launches the differential MLT-3 signal, on outputs TXP and TXM, to the twisted pair media via a 1:1 ratio isolation transformer. The 10Base-T and 100Base-TX signals pass through the same transformer so that common "magnetics" can be used for both. The transmitter drives into the 100 ohm impedance of the CAT5 cable. Cable termination and impedance matching require external components.
Rev. 6.00 Jul. 15, 2009 Page 650 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(6)
100M Phase Lock Loop (PLL)
The 100M PLL locks onto reference clock and generates the 125MHz clock used to drive the 125 MHz logic and the 100Base-Tx Transmitter.
22.6
100Base-TX Receive
CO_RX_CLK (for MII) MAC (Ether C)
100M PLL
MII 25MHz by 4 bits 25MHz by 4 bits MII 4B/5B decoder 25MHz by 5 bits Descrambler and SIPO
125Mbps Serial
NRZI converter
NRZI
MLT-3 converter
MLT-3
DSP: Timing recovery, equalize and BLW correction
MLT-3
A/D converter
Magnetics MLT-3 MLT-3 6 bit Data
RJ45 MLT-3
CAT-5
Shaded blocks are part of the PHY core
Figure 22.7 Receive Data Path The receive data path is shown in figure 22.7. Detailed descriptions are given below. (1) 100M Receive Input
The MLT-3 from the cable is fed into the Core PHY (on inputs RXP and RXM) via a 1:1 ratio transformer. The ADC samples the incoming differential signal at a rate of 125M samples per second. Using a 64-level quantizer it generates 6 digital bits to represent each sample. The DSP adjusts the gain of the ADC according to the observed signal levels such that the full dynamic range of the ADC can be used.
Rev. 6.00 Jul. 15, 2009 Page 651 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(2)
Equalizer, Baseline Wander Correction and Clock and Data Recovery
The 6 bits from the ADC are fed into the DSP block. The equalizer in the DSP section compensates for phase and amplitude distortion caused by the physical channel consisting of magnetics, connectors, and CAT- 5 cable. The equalizer can restore the signal for any goodquality CAT-5 cable between 1m and 150m. If the DC content of the signal is such that the low-frequency components fall below the low frequency pole of the isolation transformer, then the droop characteristics of the transformer will become significant and Baseline Wander (BLW) on the received signal will result. To prevent corruption of the received data, the Core PHY corrects for BLW and can receive the ANSI X3.263-1995 FDDI TP-PMD defined "killer packet" with no bit errors. The 100M PLL generates multiple phases of the 125MHz clock. A multiplexer, controlled by the timing unit of the DSP, selects the optimum phase for sampling the data. This is used as the received recovered clock. This clock is used to extract the serial data from the received signal. (3) NRZI and MLT-3 Decoding
The DSP generates the MLT-3 recovered levels that are fed to the MLT-3 converter. The MLT-3 is then converted to an NRZI data stream. (4) Descrambling
The descrambler performs an inverse function to the scrambler in the transmitter and also performs the Serial In Parallel Out (SIPO) conversion of the data. During reception of IDLE (/I/) symbols. the descrambler synchronizes its descrambler key to the incoming stream. Once synchronization is achieved, the descrambler locks on this key and is able to descramble incoming data. Special logic in the descrambler ensures synchronization with the remote PHY by searching for IDLE symbols within a window of 4000 bytes. This window ensures that a maximum packet size of 1514 bytes, allowed by the IEEE 802.3 standard, can be received with no interference. If no IDLE-symbols are detected within this time-period, receive operation is aborted and the descrambler re-starts the synchronization process.
Rev. 6.00 Jul. 15, 2009 Page 652 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(5)
Alignment
The de-scrambled signal is then aligned into 5-bit code-groups by recognizing the /J/K/ Start-ofStream Delimiter (SSD) pair at the start of a packet. Once the code-word alignment is determined, it is stored and utilized until the next start of frame. (6) 5B/4B Decoding
The 5-bit code-groups are translated into 4-bit data nibbles according to the 4B/5B table. The translated data is presented on the CO_MII_RXD[3:0] signal lines. The SSD, /J/K/, is translated to "0101 0101" as the first 2 nibbles of the MAC preamble. Reception of the SSD causes the PHY to assert the CO_RX_DV signal, indicating that valid data is available on the CO_MII_RXD bus. Successive valid code-groups are translated to data nibbles. Reception of either the End of Stream Delimiter (ESD) consisting of the /T/R/ symbols, or at least two /I/ symbols causes the PHY to deassert carrier sense and CO_RX_DV. These symbols are not translated into data. (7) Receive Data Valid Signal
The Receive Data Valid signal (CO_RX_DV) indicates that recovered and decoded nibbles are being presented on the CO_MII_RXD[3:0] outputs synchronous to CO_RX_CLK. CO_RX_DV becomes active after the /J/K/ delimiter has been recognized and CO_MII_RXD is aligned to nibble boundaries. It remains active until either the /T/R/ delimiter is recognized or link test indicates failure, etc. CO_RX_DV is asserted when the first nibble of translated /J/K/ is ready for transfer over the Media Independent Interface (MII).
J CO_RX_CLK
K
5
5
5
D
data
data
data
data
T
R
Idle
CO_RX_DV
CO_RXD
5
5
5
5
5
D
data
data
data
data
Figure 22.8 Relationship between Received Data and Some MII Signals
Rev. 6.00 Jul. 15, 2009 Page 653 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(8)
Receiver Errors
During a frame, unexpected code-groups are considered receive errors. Expected code groups are the DATA set (0 through F), and the /T/R/ (ESD) symbol pair. When a receive error occurs, the CO_RX_ER signal is asserted and arbitrary data is driven onto the CO_MII_RXD lines. Should an error be detected during the time that the /J/K/ delimiter is being decoded (bad SSD error), CO_RX_ER is asserted true and the value '1110' is driven onto the CO_MII_RXD lines. Note that the Valid Data signal is not yet asserted when the bad SSD error occurs. (9) 100M Receive Data across the MII
The 4-bit data nibbles are sent to the MII block. These data nibbles are clocked to the controller at a rate of 25MHz. The controller samples the data on the rising edge of CO_RX_CLK. CO_RX_CLK is the 25MHz output clock for the MII bus. It is recovered from the received data to clock the CO_MII_RXD bus. If there is no received signal, it is derived from the system reference clock (CO_CLKIN). When tracking the received data, CO_RX_CLK has a maximum jitter of 0.8ns (provided that the jitter of the input clock, CO_CLKIN, is below 100ps).
22.7
10Base-T Transmit
Data to be transmitted comes from the MAC layer controller. The 10Base-T transmitter receives 4-bit nibbles from the MII at a rate of 2.5MHz and converts them to a 10Mbps serial data stream. The data stream is then Manchester-encoded and sent to the analog transmitter which drives a signal onto the twisted pair via the external magnetics. The 10M transmitter uses the following blocks: * * * * MII (digital) TX 10M (digital) 10M Transmitter (analog) 10M PLL (analog)
Rev. 6.00 Jul. 15, 2009 Page 654 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(1)
10M Transmit Data across the MII
The MAC controller (EtherC) drives the transmit data onto the CO_MII_TXD BUS. When the controller (EtherC) has driven CO_TX_EN high to indicate valid data, the data is latched by the MII block on the rising edge of CO_TX_CLK. The data is in the form of 4-bit wide 2.5 MHz data. In order to comply with legacy 10Base-T MAC/Controllers, in Half-duplex mode the PHY loops back the transmitted data, on the receive path. This does not confuse the MAC/Controller since the CO_COL signal is not asserted during this time. The PHY also support the SQE (Heart beat) signal. (2) Manchester Encoding
The 4-bit wide data is sent to the TX10M block. The nibbles are converted to a 10Mbps serial NRZI data stream. The 10M PLL locks onto the external clock or internal oscillator and produces a 20MHz clock. This is used to Manchester encode the NRZ data stream. When no data is being transmitted (CO_TX_EN is low, the TX10M block outputs Normal Link Pulses (NLPs) to maintain communications with the remote link partner.
Manchester encoded output
1
1
0
0
1
Data
Figure 22.9 Manchester Encoded Output (3) 10M Transmit Drivers
The Manchester encoded data is sent to the analog transmitter where it is shaped and filtered before being driven out as a differential signal across the TXP and TXM outputs.
Rev. 6.00 Jul. 15, 2009 Page 655 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.8
10Base-T Receive
The 10Base-T receiver gets the Manchester- encoded analog signal from the cable via the magnetics. It recovers the receive clock from the signal and uses this clock to recover the NRZI data stream. This 10M serial data is converted to 4-bit data nibbles which are passed to the controller (EtherC) across the MII at a rate of 2.5 MHz. This 10M receiver uses the following blocks: * * * * (1) Filter and SQUELCH (analog) 10M PLL (analog) RX 10M (digital) MII (digital) 10M Receive Input and Squelch
The Manchester signal from the cable is fed into the core PHY (on inputs RXP and RXM) via 1:1 ratio magnetics. It is first filtered to reduce any out-of-band noise. It then passes through a SQUELCH circuit. The SQUELCH is a set of amplitude and timing comparators that normally reject differential voltage levels below 300mV and detect and recognize differential voltages above 585mV. (2) Manchester Decoding
The output of the SQUELCH goes to the RX10M block where it is validated as Manchester encoded data. The polarity of the signal is also checked. If the polarity is reversed (local RXP is connected to RXM of the remote partner and vice versa), then this is identified and corrected. The 10M PLL is locked onto the received Manchester signal and from this, generates the received 20MHz clock. Using this clock, the Manchester encoded data is extracted and converted to a 10MHz NRZI data stream. It is then converted from serial to 4-bit wide parallel data. The RX10M block also detects valid 10Base-T IDLE signals, Normal Link Pulses (NLPs), to maintain the link. (3) 10M Receive Data across the MII
The 4 bit data nibbles are sent to the MII block. These data nibbles are valid on the rising edge of the 2.5 MHz CO_RX_CLK.
Rev. 6.00 Jul. 15, 2009 Page 656 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(4)
Jabber detection
Jabber is a condition in which a station transmits for a period of time longer than the maximum permissible packet length, usually due to a fault condition, that results in holding the CO_TX_EN input for a long period. Special logic is used to detect the jabber state and abort the transmission to the line, within 45ms. Once CO_TX_EN is deasserted, the logic resets the jabber condition. Bit 1.1 indicates that a jabber condition was detected.
22.9
MAC Interface
The MII (Media Independent Interface) block is responsible for the communication with the controller (EtherC). Special sets of hand-shake signals are used to indicate that valid received/transmitted data is present on the 4 bit receive/transmit bus. (1) * * * * * * * * * * The MII includes 16 interface signals: transmit data: transmit strobe: transmit: transmit error: receive data: receive strobe: receive clock: receive error: collision indication: carrier sense: CO_MII_TXD[3:0] CO_TX_EN CO_TX_CLK CO_TX_ER CO_MII_RXD[3:0] CO_RX_DV CO_RX_CLK CO_RX_ER CO_COL CO_CRS
On the transmit path, the PHY drives the transmit clock, CO_TX_CLK, to the controller (EtherC). The controller (EtherC) synchronizes the transmit data to the rising edge of CO_TX_CLK. The controller (EtherC) drives CO_TX_EN high to indicate valid transmit data. The controller (EtherC) drives CO_TX_ER high when a transmit error is detected. On the receive path, the PHY drives both the receive data, CO_RXD, and the CO_RX_CLK signal. The controller (EtherC) clocks in the receive data on the rising edge of CO_RX_CLK when the PHY drives CO_RX_DV high. The PHY drives CO_RX_ER high when a receive error is detected.
Rev. 6.00 Jul. 15, 2009 Page 657 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(2)
Auto-negotiation
The purpose of the Auto-negotiation function is to automatically configure the PHY to the optimum link parameters based on the capabilities of its link partner. Auto-negotiation is a mechanism for exchanging configuration information between two link-partners and automatically selecting the highest performance mode of operation supported by both sides. Auto-negotiation is fully defined in clause 28 of the IEEE 802.3 specification. Once auto-negotiation has completed, information about the resolved link can be passed back to the controller (EtherC) via the Serial Management Interface (SMI). The results of the negotiation process are reflected in the Link Partner Ability Register (Register 5). The auto-negotiation protocol is a purely physical layer activity and proceeds independently of the MAC controller (EtherC). The advertised capabilities of the PHY are stored in register 4 of the SMI registers. The default advertised by the core PHY is determined by user-defined on-chip signal options. (i.e. the configuration of PHY-IF) The following blocks are activated during an Auto-negotiation session: * * * * * * * Auto-negotiation (digital) 100M ADC (analog) 100M PLL (analog) 100M equalizer/BLW/clock recovery (DSP) 10M SQUELCH (analog) 10M PLL (analog) 10M Transmitter (analog)
When enabled, auto-negotiation is started by the occurrence of one of the following events: * * * * * * Module reset (co_resetb of PHY-IF) PHY power on reset Software reset Power-down reset Link status down Setting register 0, bit 9 high (auto-negotiation restart)
Rev. 6.00 Jul. 15, 2009 Page 658 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
On detection of one of these events, the PHY begins auto-negotiation by transmitting bursts of Fast Link Pulses (FLP). These are bursts of link pulses from the 10M transmitter. They are shaped as Normal Link Pulses and can pass uncorrupted down CAT-3 or CAT-5 cable. A Fast Link Pulse Burst consists of up to 33 pulses. The 17 odd-numbered pulses, which are always present, frame the FLP burst. The 16 even-numbered pulses, which may be present or absent, contain the data word being transmitted. Presence of a data pulse represents a "1", while absence represents a "0". The data transmitted by an FLP burst is known as a "Link Code Word." These are defined fully in IEEE 802.3 clause 28. In summary, the Core PHY advertises 802.3 compliance in its selector field (the first 5 bits of the Link Code Word). It advertises its technology ability according to the bits set in register 4 of the SMI registers. There are 4 possible matches of the technology abilities. In the order of priority these are: * * * * 100M Full Duplex (Highest priority) 100M Half Duplex 10M Full Duplex 10M Half Duplex
If the full capabilities of the core PHY are advertised (100M, Full Duplex), and if the link partner is capable of 10M and 100M, then auto-negotiation selects 100M as the highest performance mode. If the link partner is capable of Half and Full duplex modes, then auto-negotiation selects Full Duplex as the highest performance operation. Once a capability match has been determined, the link code words are repeated with the acknowledge bit set. Any difference in the main content of the link code words at this time will cause auto-negotiation to re-start. Auto-negotiation will also re-start if not all of the required FLP bursts are received. The capabilities advertised during auto-negotiation by the core PHY are initially determined the co_st_mode[2:0] bits (PHYIFCR in the PHY-IF) latched after Module reset or PHY power on reset completes. This bit can also be used to disable auto-negotiation on power-up. Writing register 4 bits [8:5] allows software control of the capabilities advertised by the core PHY. Writing register 4 does not automatically re-start auto-negotiation. Register 0, bit 9 must be set before the new abilities will be advertised. Auto-negotiation can also be disabled via software by clearing register 0, bit 12. The PHY module does not support the Next Page capability.
Rev. 6.00 Jul. 15, 2009 Page 659 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(3)
Parallel Detection
If the PHY module is connected to a device lacking the ability to auto-negotiate (i.e. no FLPs are detected), it is able to determine the speed of the link based on either 100M MLT-3 symbols or 10M Normal Link Pulses. In this case the link is presumed to be Half Duplex per the IEEE standard. This ability is known as "Parallel Detection. This feature ensures interoperability with legacy link partners. If a link is formed via parallel detection, then bit 0 in register 6 is cleared to indicate that the Link Partner is not capable of auto-negotiation. The controller (EtherC) has access to this information via the management interface (SMI). If a fault occurs during parallel detection, bit 4 of register 6 is set. Register 5 is used to store the Link Partner Ability information, which is coded in the received FLPs. If the Link Partner is not auto-negotiation capable, then register 5 is updated after completion of parallel detection to reflect the speed capability of the Link Partner. (4) Re-starting Auto-negotiation
Auto-negotiation can be re-started at any time by setting register 0, bit 9. Auto-negotiation will also re-start if the link is broken at any time. A broken link is caused by signal loss. This may occur because of a cable break, or because of an interruption in the signal transmitted by the Link Partner. Auto-negotiation resumes in an attempt to determine the new link configuration. If the management entity re-starts Auto-negotiation by writing to bit 9 of the control register, the PHY module will respond by stopping all transmission/receiving operations. Once the break_link_timer is done, in the Auto-negotiation state-machine (approximately 1200ms) the autonegotiation will re-start. The Link Partner will have also dropped the link due to lack of a received signal, so it too will resume auto-negotiation detection is disabled. (5) Auto-negotiation Disabling
Auto-negotiation is disabled by setting the bit 12 in the register 0 to 0. The device forcibly reflects the information in the bit 13 (SPEED) and bit 8 (Duplex) in the register 0 to the operation speed. Information in the bit 13 (SPEED) and bit 8 (Duplex) in the register 0 is ignored while autonegotiation is enabled.
Rev. 6.00 Jul. 15, 2009 Page 660 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(6)
Half-duplex and Full-duplex
Half-duplex operation conforms to CSMA/CD (Carrier Sense Multiple Access/Collision Detect) protocol that deals with the network traffic and collision. In this mode, the carrier signal (CRS) supports either of transmit/receive operation. Receiving data during PHY transmission causes a collision. In full-duplex mode, the PHY performs transmit and receive simultaneously. In this mode, the CRS supports only receive. The CSMA/CD protocol is not applied and the collision detection is disabled.
22.10
(1)
Miscellaneous Functions
Carrier Sense
The carrier sense is output on CRS (to EtherC). CRS is a signal defined by the MII specification in the IEEE 802.3u standard. The PHY asserts CRS based only on receive activity whenever the PHY is either in repeater mode or full-duplex mode. Otherwise the PHY asserts CRS based on either transmit or receive activity. The carrier sense logic uses the encoded, unscrambled data to determine carrier activity status. It activates carrier sense with the detection of 2 non-contiguous zeros within any 10 bit span. Carrier sense terminates if a span of 10 consecutive ones is detected before a /J/K/ Start-of Stream Delimiter pair. If an SSD pair is detected, carrier sense is asserted until either /T/R/ End-of-Stream Delimiter pair or a pair of IDLE symbols is detected. Carrier is negated after the /T/ symbol or the first IDLE. If /T/ is not followed by /R/, then carrier is maintained. Carrier is treated similarly for IDLE followed by some non-IDLE symbol. (2) Collision Detect
A collision is the occurrence of simultaneous transmit and receive operations. The CO_COL output is asserted to indicate that a collision has been detected. CO_COL remains active for the duration of the collision. CO_COL is changed asynchronously to both CO_RX_CLK and TX_CLK. The CO_COL output becomes inactive during full duplex mode. CO_COL may be tested by setting register 0, bit 7 high. This enables the collision test. CO_COL will be asserted within 512 bit times of CO_TX_EN rising and will be de-asserted within 4 bit times of CO_TX_EN falling. In 10M mode, CO_COL pulses for approximately 10 bit times (1us), 2us after each transmitted packet (de-assertion of CO_TX_EN). This is the Signal Quality Error (SQE) signal and indicates that the transmission was successful.
Rev. 6.00 Jul. 15, 2009 Page 661 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(3)
Isolate Mode
The ordinary external PHY LSI has a ability to make PHY data paths electrically isolated from the MII by setting register 0, bit 10 to a logic one. But this PHY core is on-chip type so that this function is not supported. (4) Link integrity Test
This PHY performs the link integrity test as outlined in the IEEE 802.3u (Clause 24-15) Link Monitor state diagram. The link status is multiplexed with the 10Mbps link status to form the reportable link status bit in Serial Management Register 1, and is driven to LINK LED. The DSP indicates a valid MLT-3 waveform present on the RXP and RXM signals as defined by the ANSI X3.263 TP-PMD standard, to the Link Monitor state-machine, using internal signal called DATA_VALID. When DATA_VALID is asserted the control logic moves into a LinkReady state, and waits for an enable from the Auto Negotiation block. When received, the LinkUp state is entered, and the Transmit and Receive logic blocks become active. Should Auto Negotiation be disabled, the link integrity logic moves immediately to the Link-Up state, when the DATA_VALID is asserted. Note that to allow the line to stabilize, the link integrity logic will wait a minimum of 330 msec from the time DATA_VALID is asserted until the Link-Ready state is entered. Should the DATA_VALID input be negated at any time, this logic will immediately negate the Link signal and enter the Link-Down state. When the 10/100 digital block is in 10Base-T mode, the link status is from the 10Base-T receiver logic. (5) Power-Down modes
There is a power-down modes for the core: * Power-Down This power-down is controlled by register 0, bit 11. In this mode the entire PHY, except the management interface, is powered-down and stays in that condition as long as bit 0.11 is HIGH. When bit 0.11 is cleared, the PHY powers up and is automatically reset.
Rev. 6.00 Jul. 15, 2009 Page 662 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(6)
Reset
The core PHY has 4 reset sources: * Module reset (co_resetb): It is connected to the co_resetb of PHYIFCR, and to the internal POR signal. If the co_resetb is asserted(write "0"), it should be held "0" for at least 100 us to ensure that the core is properly reset. * The Power-On-Reset (POR) : POR(Power-On-Reset) signal, which is driven out of the core through the co_pwruprst of PHYIFSR, is asserted for approximately 16 ms after the first time that power is supplied to the chip. * Software (SW) reset: (Do not use with this product.) Activated by writing register 0, bit 15 high. This signal is self- clearing. After the registerwrite, internal logic extends the reset by 256s to allow PLL-stabilization before releasing the logic from reset. The IEEE 802.3u standard, clause 22 (22.2.4.1.1) states that the reset process should be completed within 0.5s from the setting of this bit. * Power-Down reset: Automatically activated when the PHY comes out of power-down mode. The internal powerdown reset is extended by 256s after exiting the power-down mode to allow the PLLs to stabilize before the logic is released from reset. These 4 reset sources are Module reset(Low active) and none Module reset(PHY power on reset, software reset, power down reset(High active) combined together in the digital block to create the internal "general reset", SYSRST, which is an asynchronous reset and is active HIGH. This SYSRST directly drives the PCS, DSP and MII blocks. It is also input to the Central Bias block in order to generate a short reset for the PLLs. The SMI mechanism and registers are reset only by the Module reset, PHY power-on reset and Software reset. During Power-Down, the SMI registers are not reset. Note that some SMI register bits are not cleared by Software reset - these are marked "NASR" in the register tables. For the first 16us after coming out of reset, the MII will run at 2.5 MHz. After that it will switch to 25 MHz if auto-negotiation is enabled.
Rev. 6.00 Jul. 15, 2009 Page 663 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(7)
LED Description
The PHY provides four LED signals. These provide a convenient means to determine the mode of operation of the core. All LED signals are active low. * The CRS LED : Its output is driven low when CRS is active (high). When CRS becomes inactive, the Activity LED output is extended by 128 ms. * The Link LED: Its output is driven low whenever the PHY detects a valid link. The use of the 10Mbps or 100Mbps link test status is determined by the condition of the internally determined speed selection. * The Speed LED: Its output is driven low when the operating speed is 100Mbit/s or during Auto-negotiation. This LED will go inactive when the operating speed is 10Mbit/s. * The Full-Duplex LED Its output is driven low when the link is operating in Full-Duplex mode. (8) Loopback Operation
The 10/100 digital has an independent loop-back mode: Internal loopback. * Internal loopback The internal loopback mode is enabled by setting bit register 0 bit 14 to logic one. In this mode, the scrambled transmit data (output of the scrambler) is looped into the receive logic (input of the descrambler). The CO_COL signal will be inactive in this mode, unless collision test (bit 0.7) is active. In this mode, during transmission (CO_TX_EN is HIGH), nothing is transmitted to the line and the transmitters are powered down.
Rev. 6.00 Jul. 15, 2009 Page 664 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.11
Internal I/O Signals
The I/O signals interface the logic of the core PHY to other modules on this LSI. The input signals can either be connected to other modules on the chip so that they can be connected to pins and driven externally, or they can be tied high or low inside the chip to set the behavior of the core PHY. The following abbreviations are used: * * * * * I: Input. Digital TTL levels. O: Output. Digital TTL levels. AI: Input. Analog levels. AO: Output. Analog levels. AI/O: Input or Output. Analog levels.
Rev. 6.00 Jul. 15, 2009 Page 665 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* MII signals
Signal Name Type Description Transmit Data 0: Bit 0 of the 4 data bits that are accepted by the PHY for transmission. Transmit Data 1: Bit 1 of the 4 data bits that are accepted by the PHY for transmission. Transmit Data 2: Bit 2 of the 4 data bits that are accepted by the PHY for transmission. Transmit Data 3: Bit 3 of the 4 data bits that are accepted by the PHY for transmission. Transmit Enable: Indicates that valid data is presented on the CO_MII_TXD[3:0] signals, for transmission. Receive Error: Asserted to indicate that an error was detected somewhere in the frame presently being transferred from the PHY. In Symbol Interface (5B Decoding) mode, this signal is the MII Receive Data 4: the MSB of the received 5-bit symbol code-group. MII Collision Detect: Asserted to indicate detection of collision condition. Receive Data 0: Bit 0 of the 4 data bits that are sent by the PHY in the receive path. Receive Data 1: Bit 1 of the 4 data bits that are sent by the PHY in the receive path. Receive Data 2: Bit 2 of the 4 data bits that sent by the PHY in the receive path. Receive Data 3: Bit 3 of the 4 data bits that sent by the PHY in the receive path. MII Transmit Error: When driven high, the 4B/5B encode process substitutes the Transmit Error code-group (/H/) for the encoded data word. This input is ignored in 10BaseT operation. In Symbol Interface (5B Decoding) mode, this signal becomes the MII Transmit Data 4: the MSB of the 5-bit symbol code-group. Carrier Sense: Indicate detection of carrier. Receive Data Valid: Indicates that recovered and decoded data nibbles are being presented on CO_MII_RXD[3:0]. Transmit Clock: 25MHz in 100Base-TX mode. 2.5MHz in 10Base-T mode. Receive Clock: 25MHz in 100Base-TX mode. 2.5MHz in 10Base-T mode.
CO_MII_TXD0 I CO_MII_TXD1 I CO_MII_TXD2 I CO_MII_TXD3 I CO_TX_EN CO_RX_ER (RXD4) I OO
CO_COL
O
CO_MII_RXD0 O CO_MII_RXD1 O CO_MII_RXD2 O CO_MII_RXD3 O CO_TX_ER (TXD4) I
CO_CRS CO_RX_DV CO_TX_CLK CO_RX_CLK
O O O O
Rev. 6.00 Jul. 15, 2009 Page 666 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Management signals
Signal Name CO_MDI CO_MDO CO_MDC CO_MDIO_DIR Type I O I O Description Management Data Input: Serial management data input. Management Data Output: Serial management data output. Management Clock: Serial management clock. Management Data Direction: May be used to control output enabled buffer for MDIO.
* General signals
Signal Name CO_CLKIN Type I Description Clock Input - PHY clock. Can be 25MHz either from mck of CPG module or from CK_PHY pin.
22.12
Signals Relevant to PHY-IF
This PHY core has a part set up by the PHY-IF module. (1) PHY address
The PHY address initialized by PHYIFADDR of PHY-IF, is same as the one that the ordinary external PHY LSI has. It gives each PHY a unique address. This address is latched into an internal register during Module reset and PHY power on reset. Originally, it enables a function to manage each PHY via the unique address in a multi-PHY application. About this PHY module, you can not connect multiple PHYs to the MII interface within the LSI. But PHY address is also used to seed the scrambler, so that please accord the configuration of PHYIFADDRR and the PHY address on the management interface. (2) Operation mode
The co_st_mode of the PHYIFCR of PHY-IF controls the configuration of 10/100 digital block.
Rev. 6.00 Jul. 15, 2009 Page 667 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Default Register Bit Values co_st_mode[2:0] of PHYIFCR Mode Definitions 000 001 010 011 100 10Base-T Half Duplex. Auto-negotiation disabled. 10Base-T Full Duplex. Auto-negotiation disabled. 100Base-TX Half Duplex. Auto-negotiation disabled.CRS is active during Transmit & Receive. 100Base-TX Full Duplex. Auto-negotiation disabled.CRS is active during Receive. Register 0 Register 4
[13,12,10,8] [8,7,6,5] 0000 0001 1000 1001 N/A N/A N/A N/A 0100
100Base-TX Half Duplex is advertised. Auto1100 negotiation enabled.CRS is active during Transmit & Receive. Reserved.(Do not set this mode) Power Down mode. In this mode the PHY wake-up in Power-Down mode. All capable. Auto-negotiation enabled. 1100 N/A X10X
101 110 111
0100 N/A 1111
22.13
(1)
Usage Notes
Input clock to PHY module
The initial clock to PHY module is internal clock, mck (= ick/4), but it does work only when it is 25MHz, which is acceptable to PHY module. It corresponds to power down mode. For example, even in the application which doesn't use the on-chip PHY module, you have to set up the clock to the on-chip PHY so that it could be low power consumption mode with power down mode. (2) Treatment of Pins When PHY Power Supply is Not Used
Even when the on-chip PHY is not used, supply power to the analog power supply pins for the PHY (Vcc1A, Vcc2A, and Vcc3A) and connect the analog ground pins for the PHY (Vss1A and Vss2A) to the ground. Pull up the CK-PHY pin to VccQ through a resistor or pull down the CK-PHY pin to VssQ through a register. Connect pins TxP, TxM, RxP, and RxM to the PHY analog ground. Connect the EXERS1 pin to the PHY analog power supply without going through a resistor. Do not connect anything to the TSTBUSA pin.
Rev. 6.00 Jul. 15, 2009 Page 668 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(3)
Software Reset of the PHY
The software reset of the on-chip PHY of this LSI has a defect in characteristics, which can prevent correct resetting of the PHY in some cases. Because of this, the PHY should be reset by a module reset, which is generated by setting the PHYIFCR register (in the PHY-IF module). Note: 1. Software reset refers to the reset which is executed by bit 15 of register 0 (basic control) described in section 22.4.2, SMI Register Mapping. 2. Module reset refers to the reset which is executed by bit 14 of PHYIFCR (PHY-IF control register) described in section 23.2, Register Descriptions, in section 23, PHY Interface (PHY-IF). (4) Waveform Adjustment
The Ethernet PHY module of this LSI has test registers for adjustment of differential output waveforms. Using these test registers in their initial values produces no problem, but their specifications are shown below to facilitate printed circuit board design by the customer. (a) Adjustment of Tx100 Waveform Output
The on-chip PHY module of this LSI has the following adjustment registers as SIM registers, which allow waveform adjustment in the Tx100 operation. These registers have been designed so that they are not accidentally written. To change their values, follow the example procedure shown in "How to Use" that is described later. * Register 20: Register for changing modes * Register 23: Register for waveform adjustment (The register numbers are decimal) * Meanings of the value written to register 23
Bit 15 14 to 9 Bit Name Initial Value 1 0 R/W RO RO Description Reserved The write value should always be 1. Reserved The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 669 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Bit 8 7
Bit Name D1CMP D0CMP
Initial Value 1 1
R/W R/W R/W
Description These bits adjust the slope. 00: Three steps up 01: Two steps up 10: One step up 11: Regular
6 5 4
D2A D1A D0A
1 0 0
R/W R/W R/W
These bits adjust the amplitude. 000: Amp 4 stp+ 001: Amp 3 stp+ 010: Amp 2 stp+ 011: Amp 1 stp+ 100: Regular 101: Amp 1 stp110: Amp 2 stp111: Amp 3 stp-
3 2
DASL DBSL
1 0
R/W R/W
These bits adjust the transition time. 00: One step up 01: One step down 10: Regular 11: Two steps down
1, 0
0
RO
Reserved The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 670 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* How to Use (Example) Write to the SIM registers in the following sequence.
Step 1 Register to be Written 0 Value for Writing H'2100 Description Select Tx100 mode. (This operation can be omitted if Tx100 full-duplex or Tx100 half-duplex mode has been selected by auto-negotiation,)* Start register write mode setting. Register write mode setting (continued) Register write mode setting (continued) Register write mode setting (continued) Finish register write mode setting. Write the setting value. (The initial value of this register is H'81C8. Change the setting as necessary.) Validate the setting value (always write this value). Terminate the register write mode (return to normal mode).
2 3 4 5 6 7 8 9
20 20 20 20 20 23 20 20
H'0000 H'0000 H'0400 H'0000 H'0400 H'xxxx H'4416 H'0000
Note: The setting of this register is initialized during the auto-negotiation process or when the PHY module is reset (including a system reset of the LSI). Accordingly, when waveform adjustment is to be performed by this register, the above steps must be carried out every time the register is initialized.
Rev. 6.00 Jul. 15, 2009 Page 671 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(b)
Adjustment Register for Tx10 Waveform Output
Note: This register has little effect. The following descriptions of the register are only for your reference. The adjustment register for Tx10 waveform output has DnTAMP (n = 1, 0) bits to adjust the amplitude of waveforms and DnTCMP (n = 1, 0) bits to adjust the slope of waveforms. The number of the register is 23 (decimal). When the value of writing of the step 8 in the adjustment register for Tx100 waveform output, described in (a), is H'4418 instead of H'4416, the value of writing of the step 7 is written as the setting value for the adjustment register for Tx10 waveform output. As described in the table below, the values written in bit15 and bit14 in the adjustment register for Tx10 waveform output are used as the setting values for DnTAMP (n = 1, 0) bits, while the values written in bit13 and bit12 are used as the setting values for DnTCMP (n = 1, 0) bits. However, based our testing, the adjustment of the amplitude by DnTAMP (n = 1, 0) bits effects only in several millivolts. * Adjustment register for Tx10 waveform output
Bit 15 14 Bit Name D1TAMP D0TAMP Initial Value 0 1 R/W R/W R/W Description These bits adjust the amplitude. 11: Amp 2 stp+ 10: Amp 1 stp+ 01: Regular 00: Amp 1 stp13 12 D1TCMP D0TCMP 0 0 R/W R/W These bits adjust the slope (transition time) (the more steps up, the gentler the slope is). 11: Three steps up 10: Two steps up 01: One step up 00: Regular 11 to 0 0 RO Reserved The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 672 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* How to Use (Example) Write to the SIM registers in the following sequence.
Step 1 2 3 4 5 6 7 8 9 Note: * Register to be Written 0 20 20 20 20 20 23 20 20 Value for Writing H'2100 H'0000 H'0000 H'0400 H'0000 H'0400 H'xxxx H'4418 H'0000 Description Select Tx100 mode (the setting by the reset of the PHY is also valid).* Start register write mode setting. Register write mode setting (continued) Register write mode setting (continued) Register write mode setting (continued) Finish register write mode setting. Write the setting value (in the "Regular" case, the initial value of this register is H'4000). Validate the setting value (in Tx10 case). Terminate the register write mode (return to normal mode).
To make the LSI enter the mode for setting the waveform adjustment, the Tx100 mode must be selected, instead of the Tx10 mode. The setting of the waveform adjustment is initialized during the auto-negotiation process or when the PHY module is reset (including a system reset of the LSI).
(c)
Detailed Descriptions
The detailed descriptions of the functions of the adjustment registers for Tx100 waveform output are given below. 1. External Specification for Waveform Generation Compliance tests include the items of the Rise Time (+/-ve) and Fall Time (+/-ve) in the "Tx100". The specified values are from 3 ns to 5 ns, respectively. Therefore, the on-chip PHY module of this LSI is designed to transfer from 0 V to 1 V in 4 ns.
Rev. 6.00 Jul. 15, 2009 Page 673 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
2. Mechanism of Waveform Generation Waveforms are generated in two ways; divided in time and voltage. For an example of divisions in time and voltage, the case of a transfer from 0 V to 1 V in 4 ns is shown below.
time
Output voltage level ----------------------------250 [mv] 500 [mv] 750 [mv] 1 [v]
----------0 1 [ns] 2 [ns] 3 [ns]
* Time ranges In this case, four-divided time ranges are generated on internal clocks, at first. Rise times are controlled as the divided numbers are controlled. Total transition time is controlled as each timing in each time range is shifted on the DnSL bits in the adjustment registers. Each slope in each time range is set on the DnCMP bits. * Voltage levels The voltage levels are also divided in four. The levels are modified at once as the maximum amplitude, the standard, is controlled on the DnA bits.
Rev. 6.00 Jul. 15, 2009 Page 674 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
3. Control Method with Adjustment Registers for Tx100 Waveform Output * Description of the bits of the adjustment registers for Tx100 waveform output The figure below shows the adjustment of the rising waveform from 0 V to 1 V, with the symbols; Vout: Maximum amplitude (target in manufacturing is 1 V) Tr: Transition time (target in manufacturing is 4 ns)
Output voltage
A single division of MLT-3 in Tx100 is 8 ns.
Tr adjustment on DnSL (n = A, B) bits (specified value: 3 to 5 ns) Sublevel 4 ( = Vout)
Sublevel 3 Vout adjustment on DnA (n = 2 to 0) bits (specified value: 1.0 0.05 V) Sublevel 2
Sublevel 1
DnCMP bits
0V
DnSL bits
0 ns Transition starts
Division 1
Division 2
Division 3
Division 4 ( = Tr)
Time
Driving speed control on DnCMP (n = 1, 0) bits, independent from Tr
Controls are set with the consept of the grid points of time divisions.
Rev. 6.00 Jul. 15, 2009 Page 675 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
* Targets in manufacturing The table below shows the targets in manufacturing. Each target can be adjusted with the adjustment registers.
Time division Division # Division 1 Division 2 Division 3 Division 4 Target in manufacturing 1 ns 2 ns 3 ns 4 ns Voltage level corresponding to time division Target in Voltage level # manufacturing Sublevel 1 Sublevel 2 Sublevel 3 Sublevel 4 250 mV 500 mV 750 mV 1V
Time ranges evenly divided (Tr/4) are adjusted on DnSL bits, and consequently the total Tr value is also adjusted. "Transition time is controlled on DnSL"
Each sublevel is adjusted on the Vout value, controlled on DnA bits (evenly divided by Vout/4). "Amplitude is controlled on DnA"
* Adjustment effects The amplitude and the transition time (the slope) are controlled independently, as shown above. The slope is controlled on the DnSL bits and DnCMP bits together. However, since it is difficult to express the generated analog waveforms quantitatively, the waveforms must be ensured on the actual boards. (d) Other Control Methods
The methods, shown below for your reference, may have some bad effects or disadvantages. Therefore, if the methods will be used, it is necessary to confirm the advantage and disadvantage sufficiently.
Rev. 6.00 Jul. 15, 2009 Page 676 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
1. Common Amplitude Adjustment Method in Tx10 and Tx100 Advantage: As a common amplitude adjustment method in Tx10 and Tx100, there is a method of modifying the resistances of the resistors R1 and R2 in figure 22.10. The amplitudes in Tx10 and Tx100 have correlations with the resistances of both the resistors R1 and R2. Increasing the resistances increases the amplitudes in both Tx10 and Tx100, while decreasing the resistances decreases the amplitudes. Disadvantage: Unfavorable outcomes may often appear in harmonic content testings. 2. Amplitude Adjustment Method in Tx10 Advantage: The amplitudes in Tx10 depend on VccnA (meaning PVCC in the example of connection above; n = 1 to 3). Increasing VccnA increases the amplitudes, while decreasing VccnA decreases the amplitudes. The amplitudes in Tx100 also depend on VccnA, though, less than in Tx100. Therefore, the amplitudes in Tx10 can be adjusted with modifying VccnA, with no influence on the results in Tx100. Disadvantage: However, since VccQ and VccnA are connected with diode inside this LSI, the permanent potential difference in them may damage the LSI's reliability. Therefore, the method has the disadvantage that VccQ must be adjusted simultaneously.
Rev. 6.00 Jul. 15, 2009 Page 677 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
22.14
Guidelines for Layout
22.14.1 General Guidelines The guidelines for four-layer boards are shown below. (1) * * * * (2) Configuration of Board Layers Layer 1: Top layer (component side), which is a signal layer Layer 2: Ground layer Layer 3: Power layer Layer 4: Bottom layer (solder side), which is a signal layer Impedance Control
Ideally, impedance control should satisfy the following. * Single ended traces: 51 ohm 10% * Differential pairs: 99 ohm 10% * No restrictions on the impedance of short power/grand traces (3) Vias
Vias are a source of impedance mismatches and distorted waveforms on transmission lines, which can cause problems of signal integrity (noise) and EMI issues. For differential signals and fast signal traces, avoid using vias on the signal lines whenever possible. If vias are used on such signal traces, ensure that they do not create problems by simulation or other means. (4) Notes on Routing
Stubs (branching) cause signal reflections, so they should be 12.7 mm (0.5 inch) or shorter for critical nets. Stagger is a bad source of crosstalk, so all the signal traces around the PHY should be 25.4 mm (1 inch) or shorter.
Rev. 6.00 Jul. 15, 2009 Page 678 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(5)
Terminations
To reduce signal reflections caused by impedance mismatches, provide damper or terminating resistance at the end-points of signal nets. Damper resistance should be placed close to the signal source, while terminating resistance should be placed at the farthest end-points of their nets. The distance from the signal source or farthest end-point must be shorter than 12.7 mm (0.5 inch). 22.14.2 Guidelines for Layout Since the signals of the PHY are analog signals with high frequencies and small amplitudes, they are susceptible to digital noise. So, routing and placement must be done with extra care. An example of connection with a pulse transformer (RJ45) is shown in figure 22.10. The codes such as C1 and R2 in the following explanation are the part numbers indicated in figure 22.10. (1) Example of Connection with a Pulse Transformer (RJ45)
PVCC
1 49.9[ohm] 1 49.9[ohm] 10[ohm] 1
R3
CN1 1 3 2 4 6 5 7 TD+ (TX+) TCT (NC) TD- (TX-) RD+ (RX+) RCT (NC) RD- (RX-) NC
8
2
2
R1
SH_TxP SH_TxM SH_RxP SH_RxM
R4*
R2 C1 1 2 6.8nF/16V
1
0.01uF/16V
2 22nF/16V 2 1
2
1
2
1
GND (FG)
C4
R5*
C3
1
2
Pulse transformer equivalent to TLA-6T718 PVSS
2
6.8nF/16V C2
PVSS
PVSS
Note:
PVCC: Analog power supply PVSS: Analog ground * R4, R5: Please set the terminating resistance as 50 ohm, summing up with both side of the magnetic (even if the magnetic is in the RJ45 connector).
Figure 22.10 Example of Connection with a Pulse Transformer (RJ45)
Rev. 6.00 Jul. 15, 2009 Page 679 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(2)
Sample Placement
1. The pulse transformer should be placed close to the PHY-related pins of this LSI. 2. Components should be placed so that the signal traces of differential pairs, TxP/TxM and RxP/RxM, do not cross each other. 3. R4 and R5, which are terminating resistors, should be placed close to this LSI. 4. R1 and R2 should be placed close to the pulse transformer (RJ45). 5. R3 and C4, which form a filter, should be placed close to the pulse transformer (RJ45). 6. C4 of the center tap should be placed close to the pulse transformer (RJ45). 7. Do not place any components on the bottom side. (3) Ground Planes
Layer 2 is divided into logic ground plane and frame ground plane. The logic ground is the combination of digital ground and analog ground. The frame ground is connected to the system ground and the shielding of the RJ45 socket so that it is grounded. Beware that this ground plane cuts impact the routing on adjacent signal layers. Signal traces of L1 and L4 should not run across the cuts in the ground plane to avoid impedance mismatches and EMI problems. Minimize the frame ground area so as to make the logic ground as large and solid as possible. Connect the logic ground and frame ground by a ferrite bead or thick signal trace to provide a DC path. For safety, exclude the area near the leads of the RJ45 from the ground area. (4) Common Power Plane
Layer 3 consists of multiple power planes of Vcc and Vcc for PLL1 and PLL2, which supply 1.8 V, and VccQ and VccnA (n = 1 to 3), which supply 3.3 V. VccnA is made up of an area of analog power for the RJ45 (connector-type pulse transformer) and an area of analog power for this LSI. (5) Sample Routing
In the above example, the ground layer is simply divided into two planes while the power layer is divided into more planes. Therefore, the top layer (component side) is superior to the bottom layer (solder side) in terms of signal integrity. If possible, all the critical signals of the PHY, differential signal pairs for example, should be wired in the top layer without any vias. Another important thing to be noted about differential signal pairs is that the pair of traces of a pair must be strictly equal in length to minimize duty cycle distortion and common mode radiation.
Rev. 6.00 Jul. 15, 2009 Page 680 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
(6)
Clock Layout
In addition to the clock input for the CPU, an external clock for the PHY (CKPHY) can also be input to this LSI. Analog power supply and analog signals should be placed far away from the oscillator, resonator, and digital devices that produce much noise. Clock signal lines should be wired in a layer higher than the ground layer (the top layer (component side) in this example). In addition, clock traces should be kept as far away from other traces as possible. The minimum spacing is three times of the trace width.
Rev. 6.00 Jul. 15, 2009 Page 681 of 816 REJ09B0237-0600
Section 22 Ethernet Physical Layer Transceiver (PHY)
Rev. 6.00 Jul. 15, 2009 Page 682 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
Section 23 PHY Interface (PHY-IF)
This is an interface for operation of the on-chip PHY on this LSI.
23.1
Features
* Selectable operation to enable the on-chip PHY or to disable (= utilizing an external PHY LSI) by pin function controller of ports. * Below settings for the on-chip PHY are available. The module reset Selectable operation clock of the PHY module, the internal clock or the exclusive external clock for PHY. But the clock of the on-chip PHY module has 25 MHz, fixed frequency.
Rev. 6.00 Jul. 15, 2009 Page 683 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
Figure 23.1 shows the block diagram of PHY-IF.
PHYIFADDRR
PHYIFSMIR2
PHYIFSMIR3
PHYIFCR
Internal bus
PFY-IF register Module reset (co_resetb) Internal PHY Reset Reset Selection (clksel) CPG Internal clock Input/output pins Ports
PHYIFSR
TXP/M, RXP/M etc. PHY clock
External clock input PFC Port (EtherC inputs) PFC LED signals EtherC function selected MII signals EtherC function selected
Input pins
MII signals Ether C
Output pins
[Legend] PHYIFCR: PHYIFSMIR2: PHYIFSMIR3: PHYIFADDRR: PHYIFSR:
PHY-IF control register PHY-IF SMI register 2 PHY-IF SMI register 3 PHY-IF address register PHY-IF status register
Figure 23.1 Block Diagram of PHY-IF
Rev. 6.00 Jul. 15, 2009 Page 684 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
23.2
Register Descriptions
PHY-IF has below registers. Refer to section 24, List of Registers, about the addresses and the status under each operating condition. * * * * * PHY-IF control register (PHYIFCR) PHY-IF SMI register 2 (PHYIFSMIR2) PHY-IF SMI register 3 (PHYIFSMIR3) PHY-IF address register (PHYIFADDRR) PHY-IF status register (PHYIFSR) PHY-IF Control Register (PHYIFCR)
23.2.1
PHYIFCR is a 16-bit readable/writeable register, which sets the operation mode of the on-chip PHY module. The changed bit values except co_resetb are taken by the module reset of the onchip PHY with co_resetb. PHYIFCR is initialized by power-on-reset. It is also initialized as H'C000 in the standby mode.
Bit 15 Bit name Initial value 1 R/W R Description Reserved. This bit is always read as 1. The write value should always be 1. 14 co_resetb 1 R/W Module reset Resets the on-chip PHY with software. 0: reset state 1: reset state is released (an initial value) 13 clksel 0 R/W Clock selection Selects which to provide to on-chip PHY, the internal clock or the external clock. 0: Uses the internal clock(mck) (an initial value) 1: Uses the external clock (CK_PHY) 12 to 3 0 R/W Reserved. These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 685 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
Bit 2 1 0
Bit name co_st_mode[2] co_st_mode[1] co_st_mode[0]
Initial value 1 1 0
R/W R/W
Description PHY mode Decides the initial value of the PHY mode. 000: 10Base-T Half Duplex. Auto-negotiation disabled. 001: 10Base-T Full Duplex. Auto-negotiation disabled. 010: 100Base-TX Half Duplex. Auto-negotiation disabled. CRS is active during Transmit & Receive. 011: 100Base-TX Full Duplex. Auto-negotiation disabled. CRS is active during Receive. 100: 100Base-TX Half Duplex is advertised. Autonegotiation enabled. CRS is active during Transmit & Receive. 101: Reserved. (Do not set this mode.) 110: Power Down mode. In this mode the PHY wake-up in Power-Down mode (an initial value) 111: All capable. Auto-negotiation enabled.
23.2.2
PHY-IF SMI Register 2 (PHYIFSMIR2)
PHYIFSMIR2 is a 16-bit readable/writeable register, which sets the initial value of SMI register 2 in the case of the module reset the on-chip PHY module. The changes of this register are taken by the on-chip PHY module reset with co_resetb. PHYIFSMIR2 is initialized by power-on-reset. It is also initialized as H'0000 in the standby mode.
Bit 15 to 0 Bit name co_reg2_oui_in[15-0] Initial value All 0 R/W R/W Description The initial value of SMI register 2 (= PHY identifier 1)[15-0]
Rev. 6.00 Jul. 15, 2009 Page 686 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
23.2.3
PHY-IF SMI Register 3 (PHYIFSMIR3)
PHYIFSMIR3 is a 16-bit readable/writeable register, which sets the initial value of SMI register 3 in the case of the module reset the on-chip PHY module. The changes of this register are taken by the on-chip PHY module reset with co_resetb. PHYIFSMIR2 is initialized by power-on-reset. It is also initialized as H'0000 in the standby mode.
Bit 15 to 0 Bit name co_reg3_oui_in[15-0] Initial value All 0 R/W R/W Description The initial value of SMI register 3 (= PHY identifier 2)[15-0]
23.2.4
PHY-IF Address Register (PHYIFADDRR)
PHYIFADDRR is a 16-bit readable/writeable register, which sets the PHY address of the on-chip PHY module. The changes of this register are taken by the on-chip PHY module reset with co_resetb. PHYIFADDRR is initialized by power-on-reset. It is also initialized as H'0000 in the standby mode.
Bit 15 to 5 Bit name Initial value All 0 R/W R Description Reserved. These bits are always read as 0. The write value should always be 0. 4 to 0 co_st_phyadd[4-0] All 0 R/W The initial value of PHY address
Rev. 6.00 Jul. 15, 2009 Page 687 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
23.2.5
PHY-IF status Register (PHYIFSR)
PHYIFSR is a 16-bit read-only register that shows the status of the on-chip PHY module. PHYIFSR is initialized by power-on-reset.
Bit 15 Bit name co_pwruprst Initial value R/W 1 (Ref. Description) 14 to 0 0 R R Description Power Up Reset This bit goes to "1" only on detection of Power up of the on-chip PHY power (Vcc1A to Vcc3A) and stays at "1" for 21 ms, automatically. Reserved. These bits are always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 688 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
23.3
PHY-IF Operation
PHY-IF is basically for initializing the on-chop PHY module. Following the procedures described in the following sections, please set up the on-chip PHY module with the MII interface like as for the external PHY LSI. The PHY module itself goes to power down mode with the initial values of co_st_mode of PHYIFCR after power-on-reset of the whole LSI at power-up. 23.3.1 The Procedures of Setting Up the On-Chip PHY
Please set up with below procedures. 1. Release of module stop First of all, release the module stop (MSTP20 of STBCR4), if PHY-IF is in module stop mode. 2. Power Up Reset Check the release of power up reset mode, shown in the co_pwruprst-bit of PHYIFSR with value "0". 3. Activation of the on-chip PHY module To activate the on-chip PHY module, set the pin function registers of Port C as something but EtherC function, that is, I/O ports and LED outputs of the on-chip PHY. * PCCRH2 = H'0000 * PCCRL1 = H'0000 * PCCRL2 = H'FF00 In this case, the LNKSTA input pin of the EtherC is deselected. As the link output of the onchip PHY and link input of the EtherC are connected in this LSI, the link signal change interrupt can be generated in the same way as the external PHY LSI is used. 4. Set up of the clock In the case of utilizing the internal clock from CPG, you have to set up the MCLKCR during the reset period of the on-chip PHY. Set the input clock of the PHY module as 25 MHz by adjusting the FRQCR and MCLKCR. Do this set up before module reset of the on-chip PHY.
Rev. 6.00 Jul. 15, 2009 Page 689 of 816 REJ09B0237-0600
Section 23 PHY Interface (PHY-IF)
5. The reset of the on-chip PHY Before you reset the on-chip PHY module, please set the register sets of PHY-IF parts as you need, except PHYIFCR. After that, set the co_resetb of PHYIFCR as zero, to make the on-chip PHY reset state. At this moment, you should set the other bits of PHYIFCR, which corresponds to the operating mode of the on-chip PHY. Please adjust the waiting time with software-loop, etc., so that you can keep the reset period is over 100 s. 6. Release of the reset of the on-chip PHY. Set only the co_resetb of PHYIFCR as "1", for releasing the reset state of the on-chip PHY. After releasing the reset, adjust the waiting time with software loops, etc. as over 20 ms for propagation of reset signal within the PHY. 7. Set up the on-chip PHY module with the MII management frame. The procedures after this step are set up by the MII management frame like an external PHY LSI on the market. Please refer the section of PHY module about the each settings of it. 23.3.2 The Procedures of Set Up the External PHY LSI
In the case of utilizing the external PHY LSI, select the EtherC function of the pin function controllers and then set up the internal registers of the PHY LSI with the MII management frame. 1. Activation of the external PHY LSI. Select the EtherC functions with pin function controller. * PCCRH2 = H'0155 * PCCRL1 = H'5555 * PCCRL2 = H'5555 2. Set up the external PHY LSI with the MII management frame. Following procedures are set up by the MII management frame. About the each settings of the PHY LSI that you utilize, please refer the documents of it.
Rev. 6.00 Jul. 15, 2009 Page 690 of 816 REJ09B0237-0600
Section 24 List of Registers
Section 24 List of Registers
The register list gives information on the on-chip I/O register addresses, how the register bits are configured, and the register states in each operating mode. The information is given as shown below. 1. Register addresses (address order) * Registers are listed from the lower allocation addresses. * Reserved addresses are indicated by in the register name column. Do not access the reserved addresses. * When registers consist of 16 or 32 bits, the addresses of the MSBs are given. * Registers are classified according to functional modules. * The numbers of Access Cycles are given. 2. Register bits * Bit configurations of the registers are listed in the same order as the register addresses. * Reserved bits are indicated by in the bit name column. * Space in the bit name field indicates that the entire register is allocated to either the counter or data. * For the registers of 16 or 32 bits, the MSB is listed first. 3. Register states in each operating mode * Register states are listed in the same order as the register addresses. * The register states shown here are for the basic operating modes. If there is a specific reset for an on-chip peripheral module, refer to the section on that on-chip peripheral module.
Rev. 6.00 Jul. 15, 2009 Page 691 of 816 REJ09B0237-0600
Section 24 List of Registers
24.1
Register Addresses (Address Order)
Entries under Access size indicates numbers of bits. The number of access cycles indicate the number of cycles of the given reference clock. B, W, and L indicate values for 8-, 16-, and 32-bit accesses, respectively. Note: Access to undefined or reserved addresses is prohibited. Since operation or continued operation is not guaranteed when these registers are accessed, do not attempt such access.
Number Abbreviation of Bits SAR_0 DAR_0 DMATCR_0 CHCR_0 SAR_1 DAR_1 DMATCR_1 CHCR_1 SAR_2 DAR_2 DMATCR_2 CHCR_2 SAR_3 DAR_3 DMATCR_3 CHCR_3 DMAOR PADRH PAIORH PACRH1 PACRH2 PBDRL PBIORL 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 16 16 16 16 16 16 16
Register Name DMA source address register_0 DMA destination address register_0 DMA transfer count register_0 DMA channel control register_0 DMA source address register_1 DMA destination address register_1 DMA transfer count register_1 DMA channel control register_1 DMA source address register_2 DMA destination address register_2 DMA transfer count register_2 DMA channel control register_2 DMA source address register_3 DMA destination address register_3 DMA transfer count register_3 DMA channel control register_3 DMA operation register Port A data register H Port A IO register H Port A control register H1 Port A control register H2 Port B data register L Port B IO register L
Address H'F8010020 H'F8010024 H'F8010028 H'F801002C H'F8010030 H'F8010034 H'F8010038 H'F801003C H'F8010040 H'F8010044 H'F8010048 H'F801004C H'F8010050 H'F8010054 H'F8010058 H'F801005C H'F8010060 H'F8050000 H'F8050004 H'F8050008 H'F805000A H'F8050012 H'F8050016
Module DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC DMAC I/O I/O I/O I/O I/O I/O
Access Size 16/32 16/32 16/32 8/16/32 16/32 16/32 16/32 8/16/32 16/32 16/32 16/32 8/16/32 16/32 16/32 16/32 8/16/32 16 8/16 8/16 8/16 8/16 8/16 8/16
Rev. 6.00 Jul. 15, 2009 Page 692 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Port B control register L1 Port B control register L2 Port C data register H Port C data register L Port C IO register H Port C IO register L Port C control register H2 Port C control register L1 Port C control register L2 Port D data register L Port D IO register L Port D control register L2 Port E data register H Port E data register L Port E IO register H Port E IO register L Port E control register H1 Port E control register H2 Port E control register L1 Port E control register L2 Interrupt priority register C Interrupt priority register D Interrupt priority register E Interrupt priority register F Interrupt priority register G DMA extended resource selector 0 DMA extended resource selector 1 Standby control register 3
Number Abbreviation of Bits PBCRL1 PBCRL2 PCDRH PCDRL PCIORH PCIORL PCCRH2 PCCRL1 PCCRL2 PDDRL PDIORL PDCRL2 PEDRH PEDRL PEIORH PEIORL PECRH1 PECRH2 PECRL1 PECRL2 IPRC IPRD IPRE IPRF IPRG DMARS0 DMARS1 STBCR3 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 8
Address H'F805001C H'F805001E H'F8050020 H'F8050022 H'F8050024 H'F8050026 H'F805002A H'F805002C H'F805002E H'F8050032 H'F8050036 H'F805003E H'F8050040 H'F8050042 H'F8050044 H'F8050046 H'F8050048 H'F805004A H'F805004C H'F805004E H'F8080000 H'F8080002 H'F8080004 H'F8080006 H'F8080008 H'F8090000 H'F8090004 H'F80A0000
Module I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O INTC INTC INTC INTC INTC DMAC DMAC Powerdown mode
Access Size 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 16 16 16 16 16 16 16 8
Rev. 6.00 Jul. 15, 2009 Page 693 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Standby control register 4
Number Abbreviation of Bits STBCR4 8
Address H'F80A0004
Module Powerdown mode CPG H-UDI H-UDI INTC INTC INTC INTC INTC CPG Powerdown mode WDT WDT Powerdown mode SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0 SCIF_0
Access Size 8
PHY-LSI clock frequency control register Instruction register ID register Interrupt control register 0 IRQ control register IRQ status register Interrupt priority register A Interrupt priority register B Frequency control register Standby control register
MCLKCR SDIR SDID ICR0 IRQCR IRQSR IPRA IPRB FRQCR STBCR
8 16 32 16 16 16 16 16 16 8
H'F80A000C H'F8100200 H'F8100214 H'F8140000 H'F8140002 H'F8140004 H'F8140006 H'F8140008 H'F815FF80 H'F815FF82
8/16* 16 32/16 8/16 8/16 8/16 8/16 8/16 16 8
Watch dog timer counter Watch dog timer control/status register Standby control register 2
WTCNT WTCSR STBCR2
8 8 8
H'F815FF84 H'F815FF86 H'F815FF88
8/16* 8/16* 8
Serial mode register_0 Bit rate register_0 Serial control register_0 Transmit FIFO data register_0 Serial status register_0 Receive FIFO data register_0 FIFO control register_0 FIFO data count register_0 Serial port register_0 Line status register_0
SCSMR_0 SCBRR_0 SCSCR_0 SCFTDR_0 SCFSR_0 SCFRDR_0 SCFCR_0 SCFDR_0 SCSPTR_0 SCLSR_0
16 8 16 8 16 8 16 16 16 16
H'F8400000 H'F8400004 H'F8400008 H'F840000C H'F8400010 H'F8400014 H'F8400018 H'F840001C H'F8400020 H'F8400024
16 8 16 8 16 8 16 16 16 16
Rev. 6.00 Jul. 15, 2009 Page 694 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Serial mode register_1 Bit rate register_1 Serial control register_1 Transmit FIFO data register_1 Serial status register_1 Receive FIFO data register_1 FIFO control register_1 FIFO data count register_1 Serial Port register_1 Line status register_1 Serial mode register_2 Bit rate register_2 Serial control register_2 Transmit FIFO data register_2 Serial status register_2 Receive FIFO data register_2 FIFO control register_2 FIFO data count register_2 Serial port register_2 Line status register_2 Mode register Clock select register Transmit data assign register Receive data assign register Control data assign register Control register FIFO control register Status register Interrupt enable register Transmit data register Receive data register
Number Abbreviation of Bits SCSMR_1 SCBRR_1 SCSCR_1 SCFTDR_1 SCFSR_1 SCFRDR_1 SCFCR_1 SCFDR_1 SCSPTR_1 SCLSR_1 SCSMR_2 SCBRR_2 SCSCR_2 SCFTDR_2 SCFSR_2 SCFRDR_2 SCFCR_2 SCFDR_2 SCSPTR_2 SCLSR_2 SIMDR SISCR SITDAR SIRDAR SICDAR SICTR SIFCTR SISTR SIIER SITDR SIRDR 16 8 16 8 16 8 16 16 16 16 16 8 16 8 16 8 16 16 16 16 16 16 16 16 16 16 16 16 16 32 32
Address H'F8410000 H'F8410004 H'F8410008 H'F841000C H'F8410010 H'F8410014 H'F8410018 H'F841001C H'F8410020 H'F8410024 H'F8420000 H'F8420004 H'F8420008 H'F842000C H'F8420010 H'F8420014 H'F8420018 H'F842001C H'F8420020 H'F8420024 H'F8480000 H'F8480002 H'F8480004 H'F8480006 H'F8480008 H'F848000C H'F8480010 H'F8480014 H'F8480016 H'F8480020 H'F8480024
Module SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_1 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SCIF_2 SIOF SIOF SIOF SIOF SIOF SIOF SIOF SIOF SIOF SIOF SIOF
Access Size 16 8 16 8 16 8 16 16 16 16 16 8 16 8 16 8 16 16 16 16 16 16 16 16 16 16 16 16 16 32 32
Rev. 6.00 Jul. 15, 2009 Page 695 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Transmit control data register Receive control data register SPI control register PHY-IF control register PHY-IF SMI register 2 PHY-IF SMI register 3 PHY-IF address register PHY-IF status register Compare match timer start register Compare match timer control/status register_0 Compare match counter_0 Compare match timer constant register_0 Compare match timer control/status register_1 Compare match counter_1 Compare match timer constant register_1 HIF index register HIF general status register HIF status/control register HIF memory control register HIF internal Interrupt control register HIF external Interrupt control register HIF address register HIF data register HIFDREQ trigger register HIF bank Interrupt control register HIF boot control register
Number Abbreviation of Bits SITCR SIRCR SPICR PHYIFCR 32 32 16 16
Address H'F8480028 H'F848002C H'F8480030 H'F8490000 H'F8490004 H'F8490008 H'F849000C H'F8490010 H'F84A0070 H'F84A0072 H'F84A0074 H'F84A0076 H'F84A0078 H'F84A007A H'F84A007C H'F84D0000 H'F84D0004 H'F84D0008 H'F84D000C H'F84D0010 H'F84D0014 H'F84D0018 H'F84D001C H'F84D0020 H'F84D0024 H'F84D0040
Module SIOF SIOF SIOF PHY-IF PHY-IF PHY-IF PHY-IF PHY-IF CMT CMT CMT CMT CMT CMT CMT HIF HIF HIF HIF HIF HIF HIF HIF HIF HIF HIF
Access Size 32 32 16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 8/16 32 32 32 32 32 32 32 32 32 32 32
PHYIFSMIR2 16 PHYIFSMIR3 16 PHYIFADDRR 16 PHYIFSR CMSTR CMCSR_0 CMCNT_0 CMCOR_0 CMCSR_1 CMCNT_1 CMCOR_1 HIFIDX HIFGSR HIFSCR HIFMCR HIFIICR HIFEICR HIFADR HIFDATA HIFDTR HIFBICR HIFBCR 16 16 16 16 16 16 16 16 32 32 32 32 32 32 32 32 32 32 32
Rev. 6.00 Jul. 15, 2009 Page 696 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Common control register Bus control register for area 0 Bus control register for area 3 Bus control register for area 4 Bus control register for area 5B Bus control register for area 6B Wait control register for area 0 Wait control register for area 3 Wait control register for area 4 Wait control register for area 5B Wait control register for area 6B SDRAM control register Refresh timer control/status register Refresh timer counter Refresh time constant register E-DMAC mode register E-DMAC transmit request register E-DMAC receive request register Transmit descriptor list start address register Receive descriptor list start address register EtherC/E-DMAC status register EtherC/E-DMAC status interrupt permission register Transmit/receive status copy enable register Receive missed-frame counter register Transmit FIFO threshold register FIFO depth register Receiving method control register
Number Abbreviation of Bits CMNCR CS0BCR CS3BCR CS4BCR CS5BBCR CS6BBCR CS0WCR CS3WCR CS4WCR CS5BWCR CS6BWCR SDCR RTCSR RTCNT RTCOR EDMR EDTRR EDRRR TDLAR RDLAR EESR EESIPR TRSCER RMFCR TFTR FDR RMCR 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Address H'F8FD0000 H'F8FD0004 H'F8FD000C H'F8FD0010 H'F8FD0018 H'F8FD0020 H'F8FD0024 H'F8FD002C H'F8FD0030 H'F8FD0038 H'F8FD0040 H'F8FD0044 H'F8FD0048 H'F8FD004C H'F8FD0050 H'FB000000 H'FB000004 H'FB000008 H'FB00000C H'FB000010 H'FB000014 H'FB000018 H'FB00001C H'FB000020 H'FB000024 H'FB000028 H'FB00002C
Module BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC BSC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC
Access Size 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Rev. 6.00 Jul. 15, 2009 Page 697 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name E-DMAC operation control register Flow control FIFO threshold register Transmit Interrupt setting register Receive buffer write address register Receive descriptor fetch address register
Number Abbreviation of Bits EDOCR FCFTR TRIMD RBWAR RDFAR 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Address H'FB000030 H'FB000034 H'FB00003C H'FB000040 H'FB000044 H'FB00004C H'FB000050 H'FB000160 H'FB000164 H'FB000168 H'FB00016C H'FB000170 H'FB000174 H'FB000178 H'FB00017C H'FB000180 H'FB000184 H'FB000188 H'FB00018C H'FB000194 H'FB000198 H'FB00019C H'FB0001A0 H'FB0001A4 H'FB0001A8 H'FB0001B4
Module E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC E-DMAC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC EtherC
Access Size 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Transmit buffer read address register TBRAR Transmit descriptor fetch address register EtherC mode register EtherC status register EtherC interrupt permission register PHY interface register MAC address high register MAC address low register Receive frame length register PHY status register Transmit retry over counter register Delayed collision detect counter register Lost carrier counter register Carrier not detect counter register CRC error frame receive counter register Frame receive error counter register Too-short frame receive counter register Too-long frame receive counter register Residual-bit frame counter register Multicast address frame receive counter register IPG setting register TDFAR ECMR ECSR ECSIPR PIR MAHR MALR RFLR PSR TROCR CDCR LCCR CNDCR CEFCR FRECR TSFRCR TLFRCR RFCR MAFCR IPGR
Rev. 6.00 Jul. 15, 2009 Page 698 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Name Automatic PAUSE frame set register Manual PAUSE frame set register Automatic PAUSE frame retransfer count set register Break data register B Break data mask register B Break control register Execution times break register Break address register B Break address mask register B Break bus cycle register B Branch source register Break address register A Break address mask register A Break bus cycle register A Branch destination register Cache control register 1
Number Abbreviation of Bits APR MPR TPAUSER BDRB BDMRB BRCR BETR BARB BAMRB BBRB BRSR BARA BAMRA BBRA BRDR CCR1 32 32 32 32 32 32 16 32 32 16 32 32 32 16 32 32
Address H'FB0001B8 H'FB0001BC H'FB0001C4 H'FFFFFF90 H'FFFFFF94 H'FFFFFF98 H'FFFFFF9C H'FFFFFFA0 H'FFFFFFA4 H'FFFFFFA8 H'FFFFFFAC H'FFFFFFB0 H'FFFFFFB4 H'FFFFFFB8 H'FFFFFFBC H'FFFFFFEC
Module EtherC EtherC EtherC UBC UBC UBC UBC UBC UBC UBC UBC UBC UBC UBC UBC Cache
Access Size 32 32 32 32 32 32 16 32 32 16 32 32 32 16 32 32
Note: *
The numbers of access cycles are eight bits when reading and 16 bits when writing.
Rev. 6.00 Jul. 15, 2009 Page 699 of 816 REJ09B0237-0600
Section 24 List of Registers
24.2
Register Bits
Register addresses and bit names of the on-chip peripheral modules are described below. Each line covers eight bits, and 16-bit and 32-bit registers are shown as 2 or 4 lines, respectively.
Register Abbreviation SAR_0 Bit Bit Bit Bit Bit Bit Bit Bit 24/16/8/0 Module DMAC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1
DAR_0
DMATCR_0
CHCR_0
DO DM1 DL
TL DM0 DS
SM1 TB
SM0 TS1
RS3 TS0
RS2 IE
AM RS1 TE
AL RS0 DE
SAR_1
DAR_1
Rev. 6.00 Jul. 15, 2009 Page 700 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation DMATCR_1
Bit 31/23/15/7
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 Module DMAC
30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1
CHCR_1
DO DM1 DL
TL DM0 DS
SM1 TB
SM0 TS1
RS3 TS0
RS2 IE
AM RS1 TE
AL RS0 DE
SAR_2
DAR_2
DMATCR_2
CHCR_2
DO DM1 DL
TL DM0 DS
SM1 TB
SM0 TS1
RS3 TS0
RS2 IE
AM RS1 TE
AL RS0 DE
SAR_3
Rev. 6.00 Jul. 15, 2009 Page 701 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation DAR_3
Bit 31/23/15/7
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 Module DMAC
30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1
DMATCR_3
CHCR_3
DO DM1 DL
TL DM0 DS PA22DR PA22IOR PA23MD0 PA19MD0 PB6DR PB6IOR PB11MD0 PB7MD0 PB3MD0
SM1 TB CMS1 PA21DR PA21IOR
SM0 TS1 CMS0 PA20DR PA20IOR
RS3 TS0 PA19DR PA19IOR
RS2 IE AE PA18DR PA18IOR
AM RS1 TE PR1 NMIF PA25DR PA17DR PA25IOR PA17IOR
AL RS0 DE PR0 DME PA24DR PA16DR PA24IOR PA16IOR I/O
DMAOR

PADRH
PA23DR
PAIORH
PA23IOR
PACRH1

PA25MD1 PA25MD0 PA24MD1 PA24MD0 PA20MD0 PA16MD0 PB8DR PB0DR PB8IOR PB0IOR PB12MD0 PB8MD0 PB4MD0 PB0MD0
PACRH2
PA23MD1
PA22MD1 PA22MD0 PA21MD1 PA21MD0 PB13DR PB5DR PB13IOR PB5IOR PA18MD0 PB12DR PB4DR PB12IOR PB4IOR PB11DR PB3DR PB11IOR PB3IOR PA17MD0 PB10DR PB2DR PB10IOR PB2IOR PB9DR PB1DR PB9IOR PB1IOR
PBDRL
PB7DR
PBIORL
PB7IOR
PBCRL1

PB13MD0 PB9MD0 PB5MD0 PB1MD0
PB10MD0 PB6MD0 PB2MD0
PBCRL2

Rev. 6.00 Jul. 15, 2009 Page 702 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation PCDRH
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 PC16DR PC8DR PC0DR PC16IOR PC8IOR PC0IOR PC20MD0 PC16MD0 PC12MD0 PC8MD0 PC4MD0 PC0MD0 PD0DR PD0IOR PD4MD0 PD0MD0 PE24DR PE16DR PE8DR PE0DR PE24IOR PE16IOR PE8IOR PE0IOR PE24MD0 Module I/O
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 PC14DR PC6DR PC14IOR PC6IOR PC19MD0 PC15MD0 PC11MD0 PC7MD0 PC3MD0 PD6DR PD6IOR PD7MD0 PD3MD0 PE22DR PE14DR PE6DR PE22IOR PE14IOR PE6IOR PC13DR PC5DR PC13IOR PC5IOR PC6MD1 PD5DR PD5IOR PD6MD1 PD2MD1 PE21DR PE13DR PE5DR PE21IOR PE13IOR PE5IOR PC20DR PC12DR PC4DR PC20IOR PC12IOR PC4IOR PC18MD0 PC14MD0 PC10MD0 PC6MD0 PC2MD0 PD4DR PD4IOR PD6MD0 PD2MD0 PE20DR PE12DR PE4DR PE20IOR PE12IOR PE4IOR PC19DR PC11DR PC3DR PC19IOR PC11IOR PC3IOR PC5MD1 PD3DR PD3IOR PD5MD1 PD1MD1 PE19DR PE11DR PE3DR PE19IOR PE11IOR PE3IOR PC18DR PC10DR PC2DR PC18IOR PC10IOR PC2IOR PC17MD0 PC13MD0 PC9MD0 PC5MD0 PC1MD0 PD2DR PD2IOR PD5MD0 PD1MD0 PE18DR PE10DR PE2DR PE18IOR PE10IOR PE2IOR PC17DR PC9DR PC1DR PC17IOR PC9IOR PC1IOR PC4MD1 PD1DR PD1IOR PD4MD1 PD0MD1 PE17DR PE9DR PE1DR PE17IOR PE9IOR PE1IOR PE24MD1
PCDRL
PC15DR PC7DR
PCIORH

PCIORL
PC15IOR PC7IOR
PCCRH2

PCCRL1

PCCRL2
PC7MD1
PDDRL
PD7DR
PDIORL
PD7IOR
PDCRL2
PD7MD1 PD3MD1
PEDRH
PE23DR
PEDRL
PE15DR PE7DR
PEIORH
PE23IOR
PEIORL
PE15IOR PE7IOR
PECRH1

Rev. 6.00 Jul. 15, 2009 Page 703 of 816 REJ09B0237-0600
Section 24 List of Registers
Register
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 PE20MD0 PE16MD0 PE12MD0 PE8MD0 PE4MD0 PE0MD0 IPRC8 IPRC0 IPRD8 IPRE8 IPRF8 IPRF0 C1RID0 C0RID0 C3RID0 C2RID0 MSTP11 MSTP19 FLDIVS0 TI0 DID24 DID16 DID8 DID0 Powerdown mode CPG H-UDI DMAC INTC Module I/O
Abbreviation 31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 PECRH2 PE23MD1 PE19MD1 PECRL1 PE15MD1 PE11MD1 PECRL2 IPRC IPRC15 IPRC7 IPRD IPRD15 IPRD7 IPRE IPRE15 IPRF IPRF15 IPRF7 IPRG IPRG15 DMARS0 C1MID5 C0MID5 DMARS1 C3MID5 C2MID5 STBCR3 STBCR4 MCLKCR SDIR FLSCS1 TI7 SDID DID31 DID23 DID15 DID7 PE23MD0 PE19MD0 PE15MD0 PE11MD0 PE7MD0 PE3MD0 IPRC14 IPRC6 IPRD14 IPRD6 IPRE14 IPRF14 IPRF6 IPRG14 C1MID4 C0MID4 C3MID4 C2MID4 FLSCS0 TI6 DID30 DID22 DID14 DID6 PE22MD1 PE18MD1 PE14MD1 PE10MD1 PE6MD1 PE2MD1 IPRC13 IPRC5 IPRD13 IPRD5 IPRE13 IPRF13 IPRF5 IPRG13 C1MID3 C0MID3 C3MID3 C2MID3 TI5 DID29 DID21 DID13 DID5 PE22MD0 PE18MD0 PE14MD0 PE10MD0 PE6MD0 PE2MD0 IPRC12 IPRC4 IPRD12 IPRD4 IPRE12 IPRF12 IPRF4 IPRG12 C1MID2 C0MID2 C3MID2 C2MID2 MSTP15 MSTP23 TI4 DID28 DID20 DID12 DID4 PE21MD1 PE17MD1 PE13MD1 PE9MD1 PE1MD1 IPRC11 IPRC3 IPRD11 IPRE11 IPRF11 IPRF3 C1MID1 C0MID1 C3MID1 C2MID1 TI3 DID27 DID19 DID11 DID3 PE21MD0 PE17MD0 PE13MD0 PE9MD0 PE5MD0 PE1MD0 IPRC10 IPRC2 IPRD10 IPRE10 IPRF10 IPRF2 C1MID0 C0MID0 C3MID0 C2MID0 MSTP13 MSTP21 FLDIVS2 TI2 DID26 DID18 DID10 DID2 PE20MD1 PE16MD1 PE12MD1 PE4MD1 PE0MD1 IPRC9 IPRC1 IPRD9 IPRE9 IPRF9 IPRF1 C1RID1 C0RID1 C3RID1 C2RID1 MSTP12 MSTP20 FLDIVS1 TI1 DID25 DID17 DID9 DID1
Rev. 6.00 Jul. 15, 2009 Page 704 of 816 REJ09B0237-0600
Section 24 List of Registers
Register
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 NMIE IRQ40S IRQ00S IRQ0L IRQ0F IPRA8 IPRA0 IPRB8 IPRB0 STC0 PFC0 Powerdown mode CPG Module INTC
Abbreviation 31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 ICR0 NMIL IRQCR IRQ71S IRQ31S IRQSR IRQ7L IRQ7F IPRA IPRA15 IPRA7 IPRB IPRB15 IPRB7 FRQCR STBCR STBY IRQ70S IRQ30S IRQ6L IRQ6F IPRA14 IPRA6 IPRB14 IPRB6 IRQ61S IRQ21S IRQ5L IRQ5F IPRA13 IPRA5 IPRB13 IPRB5 IRQ60S IRQ20S IRQ4L IRQ4F IPRA12 IPRA4 IPRB12 IPRB4 CKOEN IRQ51S IRQ11S IRQ3L IRQ3F IPRA11 IPRA3 IPRB11 IPRB3 MDCHG
26/18/10/2 25/17/9/1 IRQ50S IRQ10S IRQ2L IRQ2F IPRA10 IPRA2 IPRB10 IPRB2 STC2 PFC2 IRQ41S IRQ01S IRQ1L IRQ1F IPRA9 IPRA1 IPRB9 IPRB1 STC1 PFC1
WTCNT WTCSR STBCR2
Bit 7 TME MSTP10
Bit 6 WT/IT MSTP9
Bit 5 MSTP8
Bit 4 WOVF
Bit 3 IOVF
Bit 2 CKS2 MSTP5
Bit 1 CKS1 MSTP4
Bit 0 CKS0
WDT
Powerdown mode
SCSMR_0
C/A
CHR Bit 6 RIE Bit 6 PER2 TEND Bit 6 RTRG0
PE Bit 5 TE Bit 5 PER1 TDFE Bit 5 TTRG1
O/E Bit 4 RE Bit 4 PER0 BRK Bit 4 TTRG0
STOP Bit 3 REIE Bit 3 FER3 FER Bit 3 MCE
Bit 2 Bit 2 FER2 PER Bit 2 RSTRG2 TFRST
CKS1 Bit 1 CKE1 Bit 1 FER1 RDF Bit 1 RSTRG1 RFRST
CKS0 Bit 0 CKE0 Bit 0 FER0 DR Bit 0 RSTRG0 LOOP
SCIF_0
SCBRR_0 SCSCR_0
Bit 7 TIE
SCFTDR_0 SCFSR_0
Bit 7 PER3 ER
SCFRDR_0 SCFCR_0
Bit 7 RTRG1
Rev. 6.00 Jul. 15, 2009 Page 705 of 816 REJ09B0237-0600
Section 24 List of Registers
Register
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 T0 R0 SPBDT ORER CKS0 Bit 0 CKE0 Bit 0 FER0 DR Bit 0 RSTRG0 LOOP T0 R0 SPBDT ORER CKS0 Bit 0 CKE0 Bit 0 FER0 DR SCIF_2 SCIF_1 Module SCIF_0
Abbreviation 31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 SCFDR_0 SCSPTR_0 RTSIO SCLSR_0 SCSMR_1 C/A SCBRR_1 SCSCR_1 Bit 7 TIE SCFTDR_1 SCFSR_1 Bit 7 PER3 ER SCFRDR_1 SCFCR_1 Bit 7 RTRG1 SCFDR_1 SCSPTR_1 RTSIO SCLSR_1 SCSMR_2 C/A SCBRR_2 SCSCR_2 Bit 7 TIE SCFTDR_2 SCFSR_2 Bit 7 PER3 ER RTSDT CHR Bit 6 RIE Bit 6 PER2 TEND Bit 6 RTRG0 RTSDT CHR Bit 6 RIE Bit 6 PER2 TEND CTSIO PE Bit 5 TE Bit 5 PER1 TDFE Bit 5 TTRG1 CTSIO PE Bit 5 TE Bit 5 PER1 TDFE T4 R4 CTSDT O/E Bit 4 RE Bit 4 PER0 BRK Bit 4 TTRG0 T4 R4 CTSDT O/E Bit 4 RE Bit 4 PER0 BRK T3 R3 SCKIO STOP Bit 3 REIE Bit 3 FER3 FER Bit 3 MCE T3 R3 SCKIO STOP Bit 3 REIE Bit 3 FER3 FER T2 R2 SCKDT Bit 2 Bit 2 FER2 PER Bit 2 RSTRG2 TFRST T2 R2 SCKDT Bit 2 Bit 2 FER2 PER T1 R1 SPBIO CKS1 Bit 1 CKE1 Bit 1 FER1 RDF Bit 1 RSTRG1 RFRST T1 R1 SPBIO CKS1 Bit 1 CKE1 Bit 1 FER1 RDF
Rev. 6.00 Jul. 15, 2009 Page 706 of 816 REJ09B0237-0600
Section 24 List of Registers
Register
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 Bit 0 RSTRG0 LOOP T0 R0 SPBDT Module SCIF_2
Abbreviation 31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 SCFRDR_2 SCFCR_2 Bit 7 RTRG1 SCFDR_2 SCSPTR_2
(Reserved)
Bit 6 RTRG0
(Reserved)
Bit 5 TTRG1
(Reserved)
Bit 4 TTRG0 T4 R4
(Reserved)
Bit 3 MCE T3 R3 SCKIO
Bit 2 RSTRG2 TFRST T2 R2 SCKDT
Bit 1 RSTRG1 RFRST T1 R1 SPBIO
SCLSR_2

TRMD0 RCIM MSIMM TLREP FSE TFWM1 RFWM1 TCRDY TCRDYE
SYNCAT TFWM0 RFWM0 TFEMP SAERR TFEMPE SAERRE
REDG SYNCDL BRPS4 TFUA4 RFUA4 TDREQ FSERR TDREQE FSERRE
FL3 BRPS3 TDLA3 TDRA3 RDLA3 RDRA3 CD0A3 CD1A3 TFUA3 RFUA3 TFOVF RDMAE TFOVFE
FL2 BRPS2 BRDV2 TDLA2 TDRA2 RDLA2 RDRA2 CD0A2 CD1A2 TFUA2 RFUA2 RCRDY TFUDF RCRDYE TFUDFE
FL1 BRPS1 BRDV1 TDLA1 TDRA1 RDLA1 RDRA1 CD0A1 CD1A1 TXE TXRST TFUA1 RFUA1 RFFUL RFUDF RFFULE RFUDFE
ORER FL0 BRPS0 BRDV0 TDLA0 TDRA0 RDLA0 RDRA0 CD0A0 CD1A0 RXE RXRST TFUA0 RFUA0 RDREQ RFOVF RDREQE RFOVFE SIOF
SIMDR
TRMD1 TXDIZ
SISCR
MSSEL
SITDAR
TDLE TDRE
SIRDAR
RDLE RDRE
SICDAR
CD0E CD1E
SICTR
SCKE
SIFCTR
TFWM2 RFWM2
SISTR

SIIER
TDMAE
Rev. 6.00 Jul. 15, 2009 Page 707 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation SITDR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 SITDL8 SITDL0 SITDR8 SITDR0 SIRDL8 SIRDL0 SIRDR8 SIRDR0 SITC08 SITC00 SITC18 SITC10 SIRC08 SIRC00 SIRC18 SIRC10 SS0E FLD0 co_st_ mode[0] PHY-IF Module SIOF
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 SITDL15 SITDL7 SITDR15 SITDR7 SITDL14 SITDL6 SITDR14 SITDR6 SIRDL14 SIRDL6 SIRDR14 SIRDR6 SITC014 SITC06 SITC114 SITC16 SIRC014 SIRC06 SIRC114 SIRC16 co_resetb SITDL13 SITDL5 SITDR13 SITDR5 SIRDL13 SIRDL5 SIRDR13 SIRDR5 SITC013 SITC05 SITC113 SITC15 SIRC013 SIRC05 SIRC113 SIRC15 CPHA SSAST1 cksel SITDL12 SITDL4 SITDR12 SITDR4 SIRDL12 SIRDL4 SIRDR12 SIRDR4 SITC012 SITC04 SITC112 SITC14 SIRC012 SIRC04 SIRC112 SIRC14 CPOL SSAST0 SITDL11 SITDL3 SITDR11 SITDR3 SIRDL11 SIRDL3 SIRDR11 SIRDR3 SITC011 SITC03 SITC111 SITC13 SIRC011 SIRC03 SIRC111 SIRC13 SITDL10 SITDL2 SITDR10 SITDR2 SIRDL10 SIRDL2 SIRDR10 SIRDR2 SITC010 SITC02 SITC110 SITC12 SIRC010 SIRC02 SIRC110 SIRC12 co_st_ mode[2] SITDL9 SITDL1 SITDR9 SITDR1 SIRDL9 SIRDL1 SIRDR9 SIRDR1 SITC09 SITC01 SITC19 SITC11 SIRC09 SIRC01 SIRC19 SIRC11 FLD1 co_st_ mode[1]
SIRDR
SIRDL15 SIRDL7 SIRDR15 SIRDR7
SITCR
SITC015 SITC07 SITC115 SITC17
SIRCR
SIRC015 SIRC07 SIRC115 SIRC17
SPICR
SPIM
PHYIFCR

PHYIFSMIR2
co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o ui_in[15] ui_in[14] ui_in[13] ui_in[12] ui_in[11] ui_in[10] ui_in[9] ui_in[8]
co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o co_reg2_o ui_in[7] PHYIFSMIR3 ui_in[6] ui_in[5] ui_in[4] ui_in[3] ui_in[2] ui_in[1] ui_in [0]
co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o ui_in[15] ui_in[14] ui_in[13] ui_in[12] ui_in[11] ui_in[10] ui_in[9] ui_in[8]
co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o co_reg3_o ui_in[7] PHYIFADDRR ui_in[6] ui_in[5] ui_in[4] ui_in[3] ui_in[2] ui_in[1] ui_in[0]
co_st_phy co_st_phy co_st_phy co_st_phy co_st_phy add[4] add[3] add[2] add[1] add[0]
Rev. 6.00 Jul. 15, 2009 Page 708 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation PHYIFSR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 Module PHY-IF
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 co_pwrupr st CMIE Bit 14 Bit 6 Bit 14 Bit 6 CMIE Bit 14 Bit 6 Bit 14 Bit 6 REG4 Bit 13 Bit 5 Bit 13 Bit 5 Bit 13 Bit 5 Bit 13 Bit 5 REG3 Bit 12 Bit 4 Bit 12 Bit 4 Bit 12 Bit 4 Bit 12 Bit 4 REG2 Bit 11 Bit 3 Bit 11 Bit 3 Bit 11 Bit 3 Bit 11 Bit 3 REG1 Bit 10 Bit 2 Bit 10 Bit 2 Bit 10 Bit 2 Bit 10 Bit 2 REG0 STR1 CKS1 Bit 9 Bit 1 Bit 9 Bit 1 CKS1 Bit 9 Bit 1 Bit 9 Bit 1 BYTE1
STR0 CKS0 Bit 8 Bit 0 Bit 8 Bit 0 CKS0 Bit 8 Bit 0 Bit 8 Bit 0 BYTE0 HIF CMT
CMSTR

CMCSR_0
CMF
CMCNT_0
Bit 15 Bit 7
CMCOR_0
Bit 15 Bit 7
CMCSR_1
CMF
CMCNT_1
Bit 15 Bit 7
CMCOR_1
Bit 15 Bit 7
HIFIDX
REG5
HIFGSR

STATUS15 STATUS14 STATUS13 STATUS12 STATUS11 STATUS10 STATUS9 STATUS8 STATUS7 STATUS6 STATUS5 STATUS4 STATUS3 STATUS2 STATUS1 STATUS0 HIFSCR MD1 DMD DPOL WBSWP BMD EDN BSEL BO
Rev. 6.00 Jul. 15, 2009 Page 709 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation HIFMCR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 AI/AD IIR EIR A8 D24 D16 D8 D0 DTRG BIF Module HIF
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 LOCK IIC5 EIC5 A6 D30 D22 D14 D6 WT IIC4 EIC4 A5 D29 D21 D13 D5 IIC3 EIC3 A4 D28 D20 D12 D4 RD IIC2 EIC2 A3 D27 D19 D11 D3 IIC1 EIC1 A2 D26 D18 D10 D2 IIC0 EIC0 A9 D25 D17 D9 D1 BIE
HIFIICR
IIC6
HIFEICR
EIC6
HIFADR
A7
HIFDATA
D31 D23 D15 D7
HIFDTR

HIFBICR

Rev. 6.00 Jul. 15, 2009 Page 710 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation HIFBCR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 AC HIZCNT IWRRS0 IWRRS0 IWRRS0 IWRRS0 IWRRS0 BSC Module HIF
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 IWRWS0 TYPE2 IWRWS0 TYPE2 IWRWS0 TYPE2 IWRWS0 TYPE2 IWRWS0 TYPE2 IWW1 TYPE1 IWW1 TYPE1 IWW1 TYPE1 IWW1 TYPE1 IWW1 TYPE1 MAP IWW0 IWRRD1 TYPE0 IWW0 IWRRD1 TYPE0 IWW0 IWRRD1 TYPE0 IWW0 IWRRD1 TYPE0 IWW0 IWRRD1 TYPE0 ENDIAN IWRRD0 IWRRD0 IWRRD0 IWRRD0 IWRRD0 IWRWD1 BSZ1 IWRWD1 BSZ1 IWRWD1 BSZ1 IWRWD1 BSZ1 IWRWD1 BSZ1 HIZMEM IWRWD0 IWRRS1 BSZ0 IWRWD0 IWRRS1 BSZ0 IWRWD0 IWRRS1 BSZ0 IWRWD0 IWRRS1 BSZ0 IWRWD0 IWRRS1 BSZ0
CMNCR

CS0BCR
IWRWS1 TYPE3
CS3BCR
IWRWS1 TYPE3
CS4BCR
IWRWS1 TYPE3
CS5BBCR
IWRWS1 TYPE3
CS6BBCR
IWRWS1 TYPE3
Rev. 6.00 Jul. 15, 2009 Page 711 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation CS0WCR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 WR1 HW0 WR1 A3CL1 WTRC0 WW0 WR1 HW0 WW0 WR1 HW0 PCW1 TEH0 WR1 HW0 Module BSC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 WR0 WM WM WTRP1 WM WM TED3 WM WM WTRP0 SA1 TED2 SW1 BAS TRWL1 BAS SW1 SW1 SA0 TED1 BAS SW1 SW0 WTRCD1 TRWL0 SW0 SW0 TED0 TEH3 SW0 WR3 WR3 WTRCD0 WW2 WR3 WW2 WR3 PCW3 TEH2 WR3 WR2 HW1 WR2 WTRC1 WW1 WR2 HW1 WW1 WR2 HW1 PCW2 TEH1 WR2 HW1
CS3WCR
WR0
CS3WCR (when SDRAM is in use)
A3CL0
CS4WCR
WR0
CS5BWCR
WR0
CS5BWCR (when PCMCIA is in use)
PCW0
CS6BWCR
WR0
Rev. 6.00 Jul. 15, 2009 Page 712 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation CS6BWCR (when PCMCIA is in use)
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 PCW1 TEH0 BACTV A3COL0 RRC0 Bit 0 Bit 0 SWR TR E-DMAC Module BSC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 PCW0 TED3 WM Bit 6 Bit 6 DE SA1 TED2 CKS2 Bit 5 Bit 5 DL1 SA0 TED1 A3ROW1 CKS1 Bit 4 Bit 4 DL0 TED0 TEH3 RFSH A3ROW0 CKS0 Bit 3 Bit 3 PCW3 TEH2 RMODE RRC2 Bit 2 Bit 2 PCW2 TEH1 A3COL1 RRC1 Bit 1 Bit 1
SDCR

RTCSR
CMF
RTCNT
Bit 7
RTCOR
Bit 7
EDMR

EDTRR

Rev. 6.00 Jul. 15, 2009 Page 713 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation EDRRR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 RR TDLA24 TDLA16 TDLA8 TDLA0 RDLA24 RDLA16 RDLA8 RDLA0 RFCOF RFOF TRO CERF RFCOFIP RFOFIP TROIP CERFIP TROCE CERFCE MFC8 MFC0 Module E-DMAC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 TDLA30 TDLA22 TDLA14 TDLA6 RDLA30 RDLA22 RDLA14 RDLA6 TWB ECI TWBIP ECIIP MFC14 MFC6 TDLA29 TDLA21 TDLA13 TDLA5 RDLA29 RDLA21 RDLA13 RDLA5 TC TCIP MFC13 MFC5 TDLA28 TDLA20 TDLA12 TDLA4 RDLA28 RDLA20 RDLA12 RDLA4 TDE RRF TDEIP RRFIP RRFCE MFC12 MFC4 TDLA27 TDLA19 TDLA11 TDLA3 RDLA27 RDLA19 RDLA11 RDLA3 TFUF CND RTLF TFUFIP CNDIP RTLFIP CNDCE RTLFCE MFC11 MFC3 TDLA26 TDLA18 TDLA10 TDLA2 RDLA26 RDLA18 RDLA10 RDLA2 TABT FR DLC RTSF TABTIP FRIP DLCIP RTSFIP DLCCE RTSFCE MFC10 MFC2 TDLA25 TDLA17 TDLA9 TDLA1 RDLA25 RDLA17 RDLA9 RDLA1 RABT RDE CD PRE RABTIP RDEIP CDIP PREIP CDCE PRECE MFC9 MFC1
TDLAR
TDLA31 TDLA23 TDLA15 TDLA7
RDLAR
RDLA31 RDLA23 RDLA15 RDLA7
EESR
ADE RMAF
EESIPR
ADEIP RMAFIP
TRSCER
RMAFCE
RMFCR
MFC15 MFC7
Rev. 6.00 Jul. 15, 2009 Page 714 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation TFTR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 TFT8 TFT0 TFD0 RFD0 RNC RFF0 RFD0 TIS RBWA24 RBWA16 RBWA8 RBWA0 EtherC Module E-DMAC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 TFT7 TFT6 RBWA30 RBWA22 RBWA14 RBWA6 TFT5 RBWA29 RBWA21 RBWA13 RBWA5 TFT4 RBWA28 RBWA20 RBWA12 RBWA4 TFT3 FEC RBWA27 RBWA19 RBWA11 RBWA3 TFT10 TFT2 TFD2 RFD2 AEC RFF2 RFD2 RBWA26 RBWA18 RBWA10 RBWA2 TFT9 TFT1 TFD1 RFD1 EDH RFF1 RFD1 RBWA25 RBWA17 RBWA9 RBWA1
FDR

RMCR

EDOCR

FCFTR

TRIMD

RBWAR
RBWA31 RBWA23 RBWA15 RBWA7
Rev. 6.00 Jul. 15, 2009 Page 715 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation RDFAR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 RDFA24 RDFA16 RDFA8 RDFA0 TBRA24 TBRA16 TBRA8 TBRA0 TDFA24 TDFA16 TDFA8 TDFA0 TXF PRM ICD ICDIP MDC Module EtherC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 RDFA31 RDFA23 RDFA15 RDFA7 RDFA30 RDFA22 RDFA14 RDFA6 TBRA30 TBRA22 TBRA14 TBRA6 TDFA30 TDFA22 TDFA14 TDFA6 PE RDFA29 RDFA21 RDFA13 RDFA5 TBRA29 TBRA21 TBRA13 TBRA5 TDFA29 TDFA21 TDFA13 TDFA5 TE RDFA28 RDFA20 RDFA12 RDFA4 TBRA28 TBRA20 TBRA12 TBRA4 TDFA28 TDFA20 TDFA12 TDFA4 PRCEF PSRTO PSRTOIP RDFA27 RDFA19 RDFA11 RDFA3 TBRA27 TBRA19 TBRA11 TBRA3 TDFA27 TDFA19 TDFA11 TDFA3 ZPF ILB MDI RDFA26 RDFA18 RDFA10 RDFA2 TBRA26 TBRA18 TBRA10 TBRA2 TDFA26 TDFA18 TDFA10 TDFA2 PFR ELB LCHNG RDFA25 RDFA17 RDFA9 RDFA1 TBRA25 TBRA17 TBRA9 TBRA1 TDFA25 TDFA17 TDFA9 TDFA1 RXF MPDE DM MPD
TBRAR
TBRA31 TBRA23 TBRA15 TBRA7
TDFAR
TDFA31 TDFA23 TDFA15 TDFA7
ECMR

ECSR

ECSIPR

LCHNGIP MPDIP MDO MMD
PIR

Rev. 6.00 Jul. 15, 2009 Page 716 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation MAHR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 MA40 MA32 MA24 MA16 MA8 MA0 RFL8 RFL0 LMON TROC24 TROC16 TROC8 TROC0 Module EtherC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 MA47 MA39 MA31 MA23 MA46 MA38 MA30 MA22 MA14 MA6 RFL6 TROC30 TROC22 TROC14 TROC6 MA45 MA37 MA29 MA21 MA13 MA5 RFL5 TROC29 TROC21 TROC13 TROC5 MA44 MA36 MA28 MA20 MA12 MA4 RFL4 TROC28 TROC20 TROC12 TROC4 MA43 MA35 MA27 MA19 MA11 MA3 RFL11 RFL3 TROC27 TROC19 TROC11 TROC3 MA42 MA34 MA26 MA18 MA10 MA2 RFL10 RFL2 TROC26 TROC18 TROC10 TROC2 MA41 MA33 MA25 MA17 MA9 MA1 RFL9 RFL1 TROC25 TROC17 TROC9 TROC1
MALR
MA15 MA7
RFLR
RFL7
PSR

TROCR
TROC31 TROC23 TROC15 TROC7
CDCR
COSDC31 COSDC30 COSDC29 COSDC28 COSDC27 COSDC26 COSDC25 COSDC24 COSDC23 COSDC22 COSDC21 COSDC20 COSDC19 COSDC18 COSDC17 COSDC16 COSDC15 COSDC14 COSDC13 COSDC12 COSDC11 COSDC10 COSDC9 COSDC7 COSDC6 LCC30 LCC22 LCC14 LCC6 COSDC5 LCC29 LCC21 LCC13 LCC5 COSDC4 LCC28 LCC20 LCC12 LCC4 COSDC3 LCC27 LCC19 LCC11 LCC3 COSDC2 LCC26 LCC18 LCC10 LCC2 COSDC1 LCC25 LCC17 LCC9 LCC1 COSDC8 COSDC0 LCC24 LCC16 LCC8 LCC0
LCCR
LCC31 LCC23 LCC15 LCC7
Rev. 6.00 Jul. 15, 2009 Page 717 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation CNDCR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 CNDC24 CNDC16 CNDC8 CNDC0 CEFC24 CEFC16 CEFC8 CEFC0 FREC24 FREC16 FREC8 FREC0 TSFC24 TSFC16 TSFC8 TSFC0 TLFC24 TLFC16 TLFC8 TLFC0 RFC24 RFC16 RFC8 RFC0 MAFC24 MAFC16 MAFC8 MAFC0 Module EtherC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 CNDC31 CNDC23 CNDC15 CNDC7 CNDC30 CNDC22 CNDC14 CNDC6 CEFC30 CEFC22 CEFC14 CEFC6 FREC30 FREC22 FREC14 FREC6 TSFC30 TSFC22 TSFC14 TSFC6 TLFC30 TLFC22 TLFC14 TLFC6 RFC30 RFC22 RFC14 RFC6 MAFC30 MAFC22 MAFC14 MAFC6 CNDC29 CNDC21 CNDC13 CNDC5 CEFC29 CEFC21 CEFC13 CEFC5 FREC29 FREC21 FREC13 FREC5 TSFC29 TSFC21 TSFC13 TSFC5 TLFC29 TLFC21 TLFC13 TLFC5 RFC29 RFC21 RFC13 RFC5 MAFC29 MAFC21 MAFC13 MAFC5 CNDC28 CNDC20 CNDC12 CNDC4 CEFC28 CEFC20 CEFC12 CEFC4 FREC28 FREC20 FREC12 FREC4 TSFC28 TSFC20 TSFC12 TSFC4 TLFC28 TLFC20 TLFC12 TLFC4 RFC28 RFC20 RFC12 RFC4 MAFC28 MAFC20 MAFC12 MAFC4 CNDC27 CNDC19 CNDC11 CNDC3 CEFC27 CEFC19 CEFC11 CEFC3 FREC27 FREC19 FREC11 FREC3 TSFC27 TSFC19 TSFC11 TSFC3 TLFC27 TLFC19 TLFC11 TLFC3 RFC27 RFC19 RFC11 RFC3 MAFC27 MAFC19 MAFC11 MAFC3 CNDC26 CNDC18 CNDC10 CNDC2 CEFC26 CEFC18 CEFC10 CEFC2 FREC26 FREC18 FREC10 FREC2 TSFC26 TSFC18 TSFC10 TSFC2 TLFC26 TLFC18 TLFC10 TLFC2 RFC26 RFC18 RFC10 RFC2 MAFC26 MAFC18 MAFC10 MAFC2 CNDC25 CNDC17 CNDC9 CNDC1 CEFC25 CEFC17 CEFC9 CEFC1 FREC25 FREC17 FREC9 FREC1 TSFC25 TSFC17 TSFC9 TSFC1 TLFC25 TLFC17 TLFC9 TLFC1 RFC25 RFC17 RFC9 RFC1 MAFC25 MAFC17 MAFC9 MAFC1
CEFCR
CEFC31 CEFC23 CEFC15 CEFC7
FRECR
FREC31 FREC23 FREC15 FREC7
TSFRCR
TSFC31 TSFC23 TSFC15 TSFC7
TLFRCR
TLFC31 TLFC23 TLFC15 TLFC7
RFCR
RFC31 RFC23 RFC15 RFC7
MAFCR
MAFC31 MAFC23 MAFC15 MAFC7
Rev. 6.00 Jul. 15, 2009 Page 718 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation IPGR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 IPG0 AP8 AP0 MP8 MP0 TPAUSE 8 Module EtherC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 AP14 AP6 MP14 MP6 TPAUSE 14 AP13 AP5 MP13 MP5 TPAUSE 13 IPG4 AP12 AP4 MP12 MP4 TPAUSE 12 IPG3 AP11 AP3 MP11 MP3 TPAUSE 11 IPG2 AP10 AP2 MP10 MP2 TPAUSE 10 IPG1 AP9 AP1 MP9 MP1 TPAUSE 9
APR
AP15 AP7
MPR
MP15 MP7
TPAUSER
TPAUSE 15
TPAUSE7 TPAUSE6 TPAUSE5 TPAUSE4 TPAUSE3 TPAUSE2 TPAUSE1 TPAUSE0 BDRB BDB31 BDB23 BDB15 BDB7 BDMRB BDMB31 BDMB23 BDMB15 BDMB7 BRCR SCMFCA DBEB BDB30 BDB22 BDB14 BDB6 BDMB30 BDMB22 BDMB14 BDMB6 SCMFCB PCBB BDB29 BDB21 BDB13 BDB5 BDMB29 BDMB21 BDMB13 BDMB5 SCMFDA BDB28 BDB20 BDB12 BDB4 BDMB28 BDMB20 BDMB12 BDMB4 SCMFDB BDB27 BDB19 BDB11 BDB3 BDMB27 BDMB19 BDMB11 BDMB3 PCTE SEQ BDB26 BDB18 BDB10 BDB2 BDMB26 BDMB18 BDMB10 BDMB2 PCBA BDB25 BDB17 BDB9 BDB1 BDMB25 BDMB17 BDMB9 BDMB1 BDB24 BDB16 BDB8 BDB0 BDMB24 BDMB16 BDMB8 BDMB0 ETBE UBC
Rev. 6.00 Jul. 15, 2009 Page 719 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation BETR
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 BET8 BET0 BAB24 BAB16 BAB8 BAB0 BAMB24 BAMB16 BAMB8 BAMB0 SZB0 BSA24 BSA16 BSA8 BSA0 BAA24 BAA16 BAA8 BAA0 BAMA24 BAMA16 BAMA8 BAMA0 Module UBC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 BET7 BET6 BAB30 BAB22 BAB14 BAB6 BAMB30 BAMB22 BAMB14 BAMB6 CDB0 BSA22 BSA14 BSA6 BAA30 BAA22 BAA14 BAA6 BAMA30 BAMA22 BAMA14 BAMA6 BET5 BAB29 BAB21 BAB13 BAB5 BAMB29 BAMB21 BAMB13 BAMB5 IDB1 BSA21 BSA13 BSA5 BAA29 BAA21 BAA13 BAA5 BAMA29 BAMA21 BAMA13 BAMA5 BET4 BAB28 BAB20 BAB12 BAB4 BAMB28 BAMB20 BAMB12 BAMB4 IDB0 BSA20 BSA12 BSA4 BAA28 BAA20 BAA12 BAA4 BAMA28 BAMA20 BAMA12 BAMA4 BET11 BET3 BAB27 BAB19 BAB11 BAB3 BAMB27 BAMB19 BAMB11 BAMB3 RWB1 BSA27 BSA19 BSA11 BSA3 BAA27 BAA19 BAA11 BAA3 BAMA27 BAMA19 BAMA11 BAMA3 BET10 BET2 BAB26 BAB18 BAB10 BAB2 BAMB26 BAMB18 BAMB10 BAMB2 RWB0 BSA26 BSA18 BSA10 BSA2 BAA26 BAA18 BAA10 BAA2 BAMA26 BAMA18 BAMA10 BAMA2 BET9 BET1 BAB25 BAB17 BAB9 BAB1 BAMB25 BAMB17 BAMB9 BAMB1 SZB1 BSA25 BSA17 BSA9 BSA1 BAA25 BAA17 BAA9 BAA1 BAMA25 BAMA17 BAMA9 BAMA1
BARB
BAB31 BAB23 BAB15 BAB7
BAMRB
BAMB31 BAMB23 BAMB15 BAMB7
BBRB
CDB1
BRSR
SVF BSA23 BSA15 BSA7
BARA
BAA31 BAA23 BAA15 BAA7
BAMRA
BAMA31 BAMA23 BAMA15 BAMA7
Rev. 6.00 Jul. 15, 2009 Page 720 of 816 REJ09B0237-0600
Section 24 List of Registers
Register Abbreviation BBRA
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit 24/16/8/0 SZA0 BDA24 BDA16 BDA8 BDA0 CE Cache Module UBC
31/23/15/7 30/22/14/6 29/21/13/5 28/20/12/4 27/19/11/3 26/18/10/2 25/17/9/1 CDA1 CDA0 BDA22 BDA14 BDA6 IDA1 BDA21 BDA13 BDA5 IDA0 BDA20 BDA12 BDA4 RWA1 BDA27 BDA19 BDA11 BDA3 CF RWA0 BDA26 BDA18 BDA10 BDA2 CB SZA1 BDA25 BDA17 BDA9 BDA1 WT
BRDR
DVF BDA23 BDA15 BDA7
CCR1

Rev. 6.00 Jul. 15, 2009 Page 721 of 816 REJ09B0237-0600
Section 24 List of Registers
24.3
Module DMAC
Register States in Each Processing State
Abbr. SAR_0 DAR_0 DMATCR_0 CHCR_0 SAR_1 DAR_1 DMATCR_1 CHCR_1 SAR_2 DAR_2 DMATCR_2 CHCR_2 SAR_3 DAR_3 DMATCR_3 CHCR_3 DMAOR Address H'F8010020 H'F8010024 H'F8010028 H'F801002C H'F8010030 H'F8010034 H'F8010038 H'F801003C H'F8010040 H'F8010044 H'F8010048 H'F801004C H'F8010050 H'F8010054 H'F8010058 H'F801005C H'F8010060 H'F8050000 H'F8050004 H'F8050008 H'F805000A H'F8050012 H'F8050016 H'F805001C H'F805001E H'F8050020 H'F8050022 H'F8050024 H'F8050026 Power-On Reset Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Module Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
* * * * * * * * * * * *
3
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
I/O
PADRH PAIORH PACRH1 PACRH2 PBDRL PBIORL PBCRL1 PBCRL2 PCDRH PCDRL PCIORH PCIORL
3
3
3
3
3
3
3
3
3
3
3
Rev. 6.00 Jul. 15, 2009 Page 722 of 816 REJ09B0237-0600
Section 24 List of Registers
Module I/O
Abbr. PCCRH2 PCCRL1 PCCRL2 PDDRL PDIORL PDCRL2 PEDRH PEDRL PEIORH PEIORL PECRH1 PECRH2 PECRL1 PECRL2
Address H'F805002A H'F805002C H'F805002E H'F8050032 H'F8050036 H'F805003E H'F8050040 H'F8050042 H'F8050044 H'F8050046 H'F8050048 H'F805004A H'F805004C H'F805004E H'F8080000 H'F8080002 H'F8080004 H'F8080006 H'F8080008 H'F8090000 H'F8090004 H'F80A0000 H'F80A0004 H'F80A000C H'F8100200 H'F8100214 H'F8140000 H'F8140002 H'F8140004 H'F8140006 H'F8140008
Power-On Reset Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized* Initialized Initialized* Initialized Initialized
1 1
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Module Standby
* * * * * * * * * * * * * * * * * * *
3
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
3
3
3
3
3
3
3
3
3
3
3
3
3
INTC
IPRC IPRD IPRE IPRF IPRG
3
3
3
3
3
DMAC
DMARS0 DMARS1
Retained Retained
* * *
3
Power-down STBCR3 mode STBCR4 CPG H-UDI MCLKCR SDIR SDID INTC ICR0 IRQCR IRQSR IPRA IPRB
3
3
Retained Retained
* * * * *
3
3
3
3
3
Rev. 6.00 Jul. 15, 2009 Page 723 of 816 REJ09B0237-0600
Section 24 List of Registers
Module CPG
Abbr. FRQCR
Address H'F815FF80 H'F815FF82 H'F815FF84 H'F815FF86 H'F815FF88 H'F8400000 H'F8400004 H'F8400008 H'F840000C H'F8400010 H'F8400014 H'F8400018 H'F840001C H'F8400020 H'F8400024 H'F8410000 H'F8410004 H'F8410008 H'F841000C H'F8410010 H'F8410014 H'F8410018 H'F841001C H'F8410020 H'F8410024 H'F8420000 H'F8420004 H'F8420008 H'F842000C H'F8420010
Power-On Reset Initialized* Initialized Initialized* Initialized* Initialized Initialized Initialized Initialized Undefined Initialized Undefined Initialized Initialized Initialized* Initialized Initialized Initialized Initialized Undefined Initialized Undefined Initialized Initialized Initialized* Initialized Initialized Initialized Initialized Undefined Initialized
1 1 2 2
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Module Standby
* *
3
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Power-down STBCR mode WDT WTCNT WTCSR Power-down STBCR2 mode SCIF_0 SCSMR_0 SCBRR_0 SCSCR_0 SCFTDR_0 SCFSR_0 SCFRDR_0 SCFCR_0 SCFDR_0 SCSPTR_0 SCLSR_0 SCIF_1 SCSMR_1 SCBRR_1 SCSCR_1 SCFTDR_1 SCFSR_1 SCFRDR_1 SCFCR_1 SCFDR_1 SCSPTR_1 SCLSR_1 SCIF_2 SCSMR_2 SCBRR_2 SCSCR_2 SCFTDR_2 SCFSR_2
3
* * *
3
2
3
3
Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Rev. 6.00 Jul. 15, 2009 Page 724 of 816 REJ09B0237-0600
Section 24 List of Registers
Module SCIF_2
Abbr. SCFRDR_2 SCFCR_2 SCFDR_2 SCSPTR_2 SCLSR_2
Address H'F8420014 H'F8420018 H'F842001C H'F8420020 H'F8420024 H'F8480000 H'F8480002 H'F8480004 H'F8480006 H'F8480008 H'F848000C H'F8480010 H'F8480014 H'F8480016 H'F8480020 H'F8480024 H'F8480028 H'F848002C H'F8480030 H'F8490000 H'F8490004 H'F8490008 H'F849000C H'F8490010 H'F84A0070 H'F84A0072 H'F84A0074 H'F84A0076 H'F84A0078 H'F84A007A H'F84A007C
Power-On Reset Undefined Initialized Initialized Initialized* Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized* Initialized Initialized Initialized Initialized Initialized Initialized Initialized
4 1
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized
Module Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
SIOF
SIMDR SISCR SITDAR SIRDAR SICDAR SICTR SIFCTR SISTR SIIER SITDR SIRDR SITCR SIRCR SPICR
PHY-IF
PHYIFCR PHYIFSMIR2 PHYIFSMIR3 PHYIFADDRR PHYIFSR
CMT
CMSTR CMCSR_0 CMCNT_0 CMCOR_0 CMCSR_1 CMCNT_1 CMCOR_1
Rev. 6.00 Jul. 15, 2009 Page 725 of 816 REJ09B0237-0600
Section 24 List of Registers
Module HIF
Abbr. HIFIDX HIFGSR HIFSCR HIFMCR HIFIICR HIFEICR HIFADR HIFDATA HIFDTR HIFBICR HIFBCR
Address H'F84D0000 H'F84D0004 H'F84D0008 H'F84D000C H'F84D0010 H'F84D0014 H'F84D0018 H'F84D001C H'F84D0020 H'F84D0024 H'F84D0040 H'F8FD0000 H'F8FD0004 H'F8FD000C H'F8FD0010 H'F8FD0018 H'F8FD0020 H'F8FD0024 H'F8FD002C H'F8FD002C
Power-On Reset Initialized Initialized Initialized* Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized* Initialized* Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized
1 1
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Module Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
* * * * * * * * *
3
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
BSC
CMNCR CS0BCR CS3BCR CS4BCR CS5BBCR CS6BBCR CS0WCR CS3WCR CS3WCR (SDRAM in use) CS4WCR CS5BWCR CS5BWCR (PCMCIA in use) CS6BWCR CS6BWCR (PCMCIA in use) SDCR RTCSR
1
3
3
3
3
3
3
3
3
H'F8FD0030 H'F8FD0038 H'F8FD0038
Initialized Initialized Initialized
Retained Retained Retained
* * *
3
Retained Retained Retained
3
3
H'F8FD0040 H'F8FD0040
Initialized Initialized
Retained Retained
* *
3
Retained Retained
3
H'F8FD0044 H'F8FD0048
Initialized Initialized
Retained Retained
* *
3
Retained Retained
3
Rev. 6.00 Jul. 15, 2009 Page 726 of 816 REJ09B0237-0600
Section 24 List of Registers
Module E-DMAC
Abbr. RTCNT RTCOR EDMR EDTRR EDRRR TDLAR RDLAR EESR EESIPR TRSCER RMFCR TFTR FDR RMCR EDOCR FCFTR TRIMD RBWAR RDFAR TBRAR TDFAR
Address H'F8FD004C H'F8FD0050 H'FB000000 H'FB000004 H'FB000008 H'FB00000C H'FB000010 H'FB000014 H'FB000018 H'FB00001C H'FB000020 H'FB000024 H'FB000028 H'FB00002C H'FB000030 H'FB000034 H'FB00003C H'FB000040 H'FB000044 H'FB00004C H'FB000050 H'FB000160 H'FB000164 H'FB000168 H'FB00016C H'FB000170 H'FB000174 H'FB000178 H'FB00017C H'FB000180 H'FB000184
Power-On Reset Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized* Initialized Initialized Initialized Initialized* Initialized Initialized
1 1
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Module Standby
* *
3
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
3
Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
EtherC
ECMR ECSR ECSIPR PIR MAHR MALR RFLR PSR TROCR CDCR
Rev. 6.00 Jul. 15, 2009 Page 727 of 816 REJ09B0237-0600
Section 24 List of Registers
Module EtherC
Abbr. LCCR CNDCR CEFCR FRECR TSFRCR TLFRCR RFCR MAFCR IPGR APR MPR TPAUSER
Address H'FB000188 H'FB00018C H'FB000194 H'FB000198 H'FB00019C H'FB0001A0 H'FB0001A4 H'FB0001A8 H'FB0001B4 H'FB0001B8 H'FB0001BC H'FB0001C4 H'FFFFFF90 H'FFFFFF94 H'FFFFFF98 H'FFFFFF9C H'FFFFFFA0 H'FFFFFFA4 H'FFFFFFA8 H'FFFFFFAC H'FFFFFFB0 H'FFFFFFB4 H'FFFFFFB8 H'FFFFFFBC H'FFFFFFEC
Power-On Reset Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized Initialized* Initialized
1
Software Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Module Standby Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
Sleep Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained Retained
UBC
BDRB BDMRB BRCR BETR BARB BAMRB BBRB BRSR BARA BAMRA BBRA BRDR
Cache
CCR1
Notes: 1. 2. 3. 4.
Some bits are not initialized. Not initialized by a power-on reset caused by the WDT. This module does not enter the module standby mode. Initialization by applying the PHY power supply, not by a reset through power-on reset pin.
Rev. 6.00 Jul. 15, 2009 Page 728 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Section 25 Electrical Characteristics
25.1 Absolute Maximum Ratings
Table 25.1 shows the absolute maximum ratings. Table 25.1 Absolute Maximum Ratings
Item Power supply voltage (I/O) Power supply voltage (internal) Symbol VCCQ VCC, VCC (PLL1), VCC (PLL2) Vin VCC1A VCC2A VCC3A Topr Value -0.3 to +3.8 -0.3 to +2.1 Unit V V
Input voltage Analog power supply (PHY)
-0.3 to VCCQ + 0.3 -0.3 to +3.8
V V
Operating temperature
See the operating temperatures given in appendix B, Product Code Lineup. -55 to +125
C
Storage temperature
Tstg
C
Caution: Permanent damage to the LSI may result if absolute maximum ratings are exceeded.
Rev. 6.00 Jul. 15, 2009 Page 729 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.2
Power-On and Power-Off Order
* Order of turning on 1.8-V system power (Vcc, Vcc (PLL1), and Vcc (PLL2)) and 3.3-V system power (VccQ, Vcc1A, Vcc2A, and Vcc3A) First turn on the 3.3-V system power, then turn on the 1.8-V system power within 1 ms. This time should be as short as possible. The system design must ensure that the states of pins or undefined period of an internal state do not cause erroneous system operation. Until voltage is applied to all power supplies and a low level is input to the RES pin, internal circuits remain unsettled, and so pin states are also undefined. The system design must ensure that these undefined states do not cause erroneous system operation. Waveforms at power-on are shown in the following figure.
VccQ: 3.3-V system power VccnA: 3.3-V system power*2 VccQ (min.) power VccnA (min.) power*2 Vcc: 1.8-V system power Vcc (min.) Vcc/2 GND tUNC Pin states undefined RES Input low level in advance Normal operation period
tPWU
Other pins *1 Pin states undefined Notes: 1. Except power/GND and clock related pins 2. n = 1 to 3 Power-on reset state
Table 25.2 Recommended Timing at Power-On
Item Time difference between turning on VccQ, VccnA (n = 1 to 3), and Vcc Time over which the internal state is undefined Note: * Symbol tPWU tUNC Maximum Value 1 100 Unit ms ms
The values shown in table 25.2 are recommended values, so they represent guidelines rather than strict requirements.
Rev. 6.00 Jul. 15, 2009 Page 730 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
The time over which the internal state is undefined means the time taken to reach Vcc (min.). The pin states become settled when VccQ and VccnA (n = 1 to 3) reached the VccQ (min.). The timing when a power-on reset (RES) is normally accepted is after Vcc reaches Vcc (min.) and oscillation becomes stable (when using the on-chip oscillator). Ensure that the time over which the internal state is undefined is less than or equal to 100 ms. * Power-off order In the reverse order of power-on, first turn off the 1.8-V system power, then turn off the 3.3-V system power within 10 ms. This time should be as short as possible. The system design must ensure that the states of pins or undefined period of an internal state do not cause erroneous system operation. In some systems, Vcc may exceed 3.3-V system power (Vcc > 3.3-V system power) temporarily, on the falling edge. Even in this case, the inverted potential difference must be 0.3 V or less. Pin states are undefined while only the 1.8-V system power is turned off. The system design must ensure that these undefined states do not cause erroneous system operation.
VccQ: 3.3-V system power VccnA: 3.3-V system power*
Vcc : 1.8-V system power max 0.3V Vcc/2 GND Normal operation period Note: * n = 1 to 3 tPWD Operation stopped
Table 25.3 Recommended Timing in Power-Off
Item Symbol Maximum Value 10 Unit ms
Time difference between turning off VccQ, VccnA (n = 1 tPWD to 3), and Vcc Note: *
The table shown above is recommended values, so they represent guidelines rather than strict requirements.
Rev. 6.00 Jul. 15, 2009 Page 731 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.3
DC Characteristics
Tables 25.4 and 25.5 show the DC characteristics. Table 25.4 DC Characteristics (1) Conditions: For Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Current consumption Symbol Normal operation ICC ICCQ Standby mode Istby (VCC) Min. Typ. 250 60 700* 20* Max. 300 100 Test Unit Conditions mA mA A VCC = 1.8 V VCCQ = 3.3 V I = 125 MHz B = 62.5 MHz Ta = 25C VCC = 1.8 V VCCQ = 3.3 V *: Reference value VCC = 1.8 V VCCQ = 3.3 V B = 62.5 MHz Vin = 0.5 to VCCQ - 0.5 V Vin = 0.5 to VCCQ - 0.5 V
Istby (VCCQ, VCCnA (n = 1 to 3)) Sleep mode Isleep
70
150
mA
Input leakage current Tri-state leakage current Input capacitance
All pins I/O pins, all output pins (off state) RxP/M Other than above
| Iin | | ISTI |


1.0 1.0
A A
C


30 10
pF
Rev. 6.00 Jul. 15, 2009 Page 732 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Table 25.4 DC Characteristics (2) Conditions: For Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Power supply Symbol VCCQ Min. 3.0 Typ. 3.3 1.8 Max. 3.6 1.89 Test Unit Conditions V
1.71 VCC, VCC (PLL1), VCC (PLL2) VCC1A VCC2A VCC3A 3.0
3.3
3.6
Note: The voltage should be the same as VCCQ.
Input high voltage
RES, NMI, IRQ7 VIH to IRQ0, MD5, MD3 to MD0, ASEMD, TESTMD, HIFMD, TRST EXTAL, CK_PHY Other input pins RES, NMI, IRQ7 VIL to IRQ0, MD5, MD3 to MD0, ASEMD, TESTMD, HIFMD, TRST EXTAL, CK_PHY Other input pins
VCCQ x 0.9
VCCQ + 0.3 V
VCCQ - 0.3 2.0 -0.3
VCCQ + 0.3 VCCQ + 0.3 VCCQ x 0.1
Input low voltage
-0.3 -0.3 VOH 2.4 2.0

VCCQ x 0.2 VCCQ x 0.2 0.55 V V VCCQ = 3.0 V IOH = -200 A VCCQ = 3.0 V IOH = -2 mA VCCQ = 3.6 V IOL = 2.0 mA
Output high All output pins voltage
Output low voltage
All output pins
VOL
Notes: 1. The Vcc and Vss pins must be connected to the VCC and VSS. 2. Current consumption values are for VIH min. = VCCQ - 0.5 V and VIL max. = 0.5 V with all output pins unloaded.
Rev. 6.00 Jul. 15, 2009 Page 733 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Table 25.5 Permissible Output Currents Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Permissible output low current (per pin) Permissible output low current (total) Permissible output high current (per pin) Permissible output high current (total) Caution: Symbol IOL IOL -IOH -IOH Min. Typ. Max. 2.0 120 2.0 40 Unit mA mA mA mA
To protect the LSI's reliability, do not exceed the output current values in table 25.5.
25.4
AC Characteristics
Signals input to this LSI are basically handled as signals synchronized with the clock. Unless otherwise noted, setup and hold times for individual signals must be followed. Table 25.6 Maximum Operating Frequency Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Operating frequency CPU, cache (I) External bus (B) On-chip peripheral module (P) Symbol f Min. 20 20 5 Typ. Max. 125 62.5 31.25 Test Unit Conditions MHz
Rev. 6.00 Jul. 15, 2009 Page 734 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.1
Clock Timing
Table 25.7 Clock Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup; External bus operating frequency (Max.) = 62.5 MHz
Item EXTAL clock input frequency EXTAL clock input cycle time EXTAL clock input low pulse width EXTAL clock input high pulse width EXTAL clock rising time EXTAL clock falling time CKIO clock output frequency CKIO clock output cycle time CKIO clock low pulse width CKIO clock high pulse width CKIO clock rising time CKIO clock falling time CK_PHY clock input frequency CK_PHY clock input low pulse width Symbol fEX tExcyc tEXL tEXH tExr tExf fOP tcyc tCKOL tCKOH tCKOr tCKOf fCKPHY tCKPHYL Min. 10 40 10 10 20 16 3.5 3.5 25 -100 ppm*1 12 12 10 25 20 Max. 25 100 4 4 62.5 50 4.5 4.5 25 +100 ppm*1 6 6 Unit. MHz ns ns ns ns ns MHz ns ns ns ns ns MHz ns ns ns ns ms ns tbcyc*
2
Reference Figures Figure 25.1
Figure 25.2
CK_PHY clock input high pulse tCKPHYH width CK_PHY clock input rising time tCKPHYr CK_PHY clock input falling time tCKPHYf Oscillation settling time (power- tOSC1 on) RES setup time RES assert time tRESS tRESW
Figure 25.3 Figures 25.3 and 25.4
Rev. 6.00 Jul. 15, 2009 Page 735 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Item Oscillation settling time 1 (leaving standby mode) Oscillation settling time 2 (leaving standby mode) PLL synchronize settling time
Symbol tOSC2 tOSC3 tPLL
Min. 10
Max. 10 100
Unit. ms ms s
Reference Figures Figure 25.4 Figure 25.5 Figure 25.6
Notes: 1. Error margin means frequency tolerance (reference value). Recommending under 100 ps of peak to peak jitter. 2. tbcyc indicates the period of the external bus clock (B).
tEXcyc tEXH tEXL VIH 1/2 VCC tEXr
EXTAL* (input) 1/2 VCC
VIH
VIH VIL tEXf VIL
Note: * When the clock is input to the EXTAL pin
Figure 25.1 External Clock Input Timing
tcyc tCKOH tCKOL
CKIO (output)
1/2 VCC
VOH
VOH VOL tCKOf
VOH VOL
1/2 VCC tCKOr
tCKPHYcyc tCKPHYH tCKPHYL
CK_PHY
1/2 VCC
VOH
VOH VOL
VOH VOL
1/2 VCC tCKPHYr
tCKPHYf
Figure 25.2 CKIO Clock Output Timing and CK_PHY Clock Input Timing
Rev. 6.00 Jul. 15, 2009 Page 736 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Oscillation settled CKIO, internal clock VCC VCC min. tOSC1 RES
tRESW
tRESS
Note: Oscillation settling time when the internal oscillator is in use
Figure 25.3 Oscillation Settling Timing after Power-On
Standby mode CKIO, internal clock tRESW Oscillation settled
tOSC2 RES
Note: Oscillation settling time when the internal oscillator is in use
Figure 25.4 Oscillation Settling Timing after Standby Mode (By Reset)
Standby mode CKIO, internal clock tOSC3 Oscillation settled
NMI
Note: Oscillation settling time when the internal oscillator is in use
Figure 25.5 Oscillation Settling Timing after Standby Mode (By NMI or IRQ)
Rev. 6.00 Jul. 15, 2009 Page 737 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Reset or NMI interrupt request Input clock settled
Standby mode
Input clock settled
EXTAL input PLL synchronization PLL output, CKIO output
tPLL
PLL synchronization
Internal clock
Note: PLL oscillation settling time when the clock is input to the EXTAL pin
Figure 25.6 PLL Synchronize Settling Timing By Reset or NMI
Rev. 6.00 Jul. 15, 2009 Page 738 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.2
Control Signal Timing
Table 25.8 Control Signal Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item RES pulse width RES setup time* RES hold time NMI setup time* NMI hold time IRQ7 to IRQ0 setup time*1 IRQ7 to IRQ0 hold time Bus tri-state delay time 1 Bus tri-state delay time 2 Bus buffer on time 1 Bus buffer on time 2
1 1
Symbol tRESW tRESS tRESH tNMIS tNMIH tIRQS tIRQH tBOFF1 tBOFF2 tBON1 tBON2
Min. 20*2 25 15 12 10 12 10
Max. 20 20 20 20
Unit tbcyc*3 ns ns ns ns ns ns ns ns ns ns
Reference Figures Figures 25.7 and 25.8
Figure 25.8
Figure 25.9
Notes: 1. The RES, NMI, and IRQ7 to IRQ0 signals are asynchronous signals. When the setup time is satisfied, a signal change is detected at the rising edge of the clock signal. When the setup time is not satisfied, a signal change may be delayed to the next rising edge. 2. In standby mode, tRESW = tOSC2 (10 ms). When changing the clock multiplication, tRESW = tPLL1 (100 s). 3. tbcyc indicates the period of the external bus clock (B).
CKIO tRESS tRESW RES tRESS
Figure 25.7 Reset Input Timing
Rev. 6.00 Jul. 15, 2009 Page 739 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
CKIO tRESH RES tNMIH NMI tIRQH IRQ7 to IRQ0 VIL tRESS VIH VIL tNMIS VIH VIL tIRQS VIH
Figure 25.8 Interrupt Input Timing
Normal mode
CKIO tBOFF2 RD, RD/WR, RAS, CAS, CSn, WEn, BS, CKE tBOFF1 A25 to A0, D15 to D0 tBON1 tBON2
Standby mode
Normal mode
Figure 25.9 Pin Drive Timing in Standby Mode
Rev. 6.00 Jul. 15, 2009 Page 740 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.3
AC Bus Timing
Table 25.9 Bus Timing Conditions: Clock mode = 1/2/5/6, VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Address delay time 1 Address setup time Address hold time BS delay time CS delay time 1 Read write delay time Read strobe time Read data setup time 1 Read data setup time 2 Read data hold time 1 Read data hold time 2 Symbol Min. tAD1 tAS tAH tBSD tCSD1 tRWD1 tRSD tRDS1 tRDS2 tRDH1 tRDH2 1 3 3 1 1 1/2 x tbcyc 1/2 x tbcyc + 10 10 0 2 1/2 x tbcyc 2 Max. 14 14 14 14 Unit ns ns ns ns ns ns Reference Figures Figures 25.10 to 25.36 Figures 25.10 to 25.13 Figures 25.10 to 25.13 Figures 25.10 to 25.29 and 25.33 to 25.36 Figures 25.10 to 25.36 Figures 25.10 to 25.36 Figures 25.10 to 25.15, 25.33, and 25.34 Figures 25.10 to 25.15 and 25.33 to 25.36 Figures 25.16 to 25.19, Figures 25.24 to 25.26 Figures 25.10 to 25.15 and 25.33 to 25.36 Figures 25.16 to 25.19 and 25.24 to 25.26 Figures 25.10 to 25.14, 25.33, and 25.34 Figure 25.15 Figures 25.10 to 25.15 and 25.33 to 25.36 Figures 25.20 to 25.23 and 25.27 to 25.29 Figures 25.10 to 25.15 and 25.33 to 25.36
1/2 x tbcyc + 13 ns ns ns ns ns
Write enable delay time 1 tWED1 Write enable delay time 2 tWED2 Write data delay time 1 Write data delay time 2 Write data hold time 1 tWDD1 tWDD2 tWDH1
1/2 x tbcyc + 10 ns 13 18 14 ns ns ns ns
Rev. 6.00 Jul. 15, 2009 Page 741 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Item Write data hold time 2 Write data hold time 3 WAIT setup time WAIT hold time RAS delay time CAS delay time DQM delay time CKE delay time ICIORD delay time ICIOWR delay time IOIS16 setup time IOIS16 hold time Note: *
Symbol Min. tWDH2 tWDH3 tWTS1* tWTH1* tRASD1 tCASD1 tDQMD1 tCKED1 tICRSD tICWSD tIO16S tIO16H 2 0 1/2 x tbcyc + 11 1/2 x tbcyc + 10 1 1 1 1/2 x tbcyc 1/2 x tbcyc 1/2 x tbcyc + 11 1/2 x tbcyc + 10
Max. 14 14 14 14
Unit ns ns ns ns ns ns ns ns
Reference Figures Figures 25.20 to 25.23 and 25.27 to 25.29 Figures 25.10 to 25.13 Figures 25.12 to 25.15, 25.34, and 25.36 Figures 25.12 to 25.15, 25.34, and 25.36 Figures 25.16 to 25.27 and 25.29 to 25.32 Figures 25.16 to 25.32 Figures 25.16 to 25.29 Figure 25.31 Figures 25.35 and 25.36 Figures 25.35 and 25.36 Figure 25.36 Figure 25.36
1/2 x tbcyc + 15 ns 1/2 x tbcyc + 15 ns ns ns
The AC timing specification of WAIT is as follows. Input setup time + hold time of WAIT = 11 [ns] + 10 [ns] = 21 [ns] As the frequency, 47.62 [MHz] Therefore, when the bus clock is 47.62 MHz or more, at least either setup time or hold time cannot be satisfied during 1-bus clock. The following notes should be confirmed. * When the hardware-wait function is used synchronously The bus clock frequency must be low enough to satisfy the AC specification above. * When the hardware-wait function is used asynchronously To ensure the setup time until the start of the input assertion of WAIT, insert appropriate number of the software wait after the T1 state. Then, even if the AC specification above cannot be satisfied, the accesses can be executed correctly.
Rev. 6.00 Jul. 15, 2009 Page 742 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.4
Basic Timing
T1 T2
CKIO
tAD1 tAD1
A25 to A0
tAS tCSD1 tCSD1
CSn
tRWD1 tRWD1
RD/WR
tRSD tRSD tAH
RD
Read
tRDS1
tRDH1
D31 to D0
tWED1
tWED1
tAH
WEn
Write
tWDD1
tWDH3
tWDH1
D31 to D0
tBSD tBSD
BS
tDACD tDACD
DACKn*
Note : * DACKn is the waveform when active low is selected.
Figure 25.10 Basic Bus Timing: No Wait Cycle
Rev. 6.00 Jul. 15, 2009 Page 743 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
T1
Tw
T2
CKIO
tAD1 tAD1
A25 to A0
tAS tCSD1 tCSD1
CSn
tRWD1 tRWD1
RD/WR
tRSD tRSD tAH
RD Read D31 to D0
tRDS1
tRDH1
tWED1
tWED1
tAH
WEn Write D31 to D0
tBSD tBSD tWDD1
tWDH3
tWDH1
BS
tDACD tDACD
DACKn*
tWTH1 tWTS1
WAIT
Note : * DACKn is the waveform when active low is selected.
Figure 25.11 Basic Bus Timing: One Software Wait Cycle
Rev. 6.00 Jul. 15, 2009 Page 744 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
T1
TwX
T2
CKIO
tAD1 tAD1
A25 to A0
tAS tCSD1 tCSD1
CSn
tRWD1 tRWD1
RD/WR
tRSD tRSD tAH
RD Read D31 to D0
tRDS1
tRDH1
tWED1
tWED1
tAH
WEn Write D31 to D0
tBSD tBSD tWDD1
tWDH3
tWDH1
BS
tDACD tDACD
DACKn*
tWTH1 tWTS1 tWTH1 tWTS1
WAIT
Note : * DACKn is the waveform when active low is selected.
Figure 25.12 Basic Bus Timing: One External Wait Cycle
Rev. 6.00 Jul. 15, 2009 Page 745 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
T1
Tw
T2
Taw
T1
Tw
T2
Taw
CKIO
tAD1 tAD1 tAD1 tAD1
A25 to A0
tAS tCSD1 tCSD1 tAS tCSD1 tCSD1
CSn
tRWD1 tRWD1 tRWD1 tRWD1
RD/WR
tRSD tRSD tAH tRSD tRSD tAH
RD
tRDH1 tRDS1 tRDS1
tRDH1
Read
D15 to D0
tWED1
tWED1
tAH
tWED1
tWED1
tAH
WEn
tWDH3
tWDH3
Write
D15 to D0
tWDD1
tWDH1
tWDD1
tWDH1
tBSD
tBSD
tBSD
tBSD
BS
tDACD tDACD tDACD tDACD
DACKn
*
tWTH1 tWTS1 tWTH1 tWTS1
WAIT
Note : * DACKn is the waveform when active low is selected.
Figure 25.13 Basic Bus Timing: One Software Wait Cycle, External Wait Enabled (WM Bit = 0), No Idle Cycle
Rev. 6.00 Jul. 15, 2009 Page 746 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Th
T1
Twx
T2
Tf
CKIO
tAD1 tAD1
A25 to A0
tCSD1 tCSD1
CSn
tWED1 tWED1
WEn
tRWD1 tRWD1
RD/WR
tRSD tRSD
Read
RD
tRDS1
tRDH1
D31 to D0
tRWD1 tRWD1
RD/WR
tWDD1 tWDH1
Write D31 to D0
tBSD tBSD
BS
tDACD tDACD
DACKn* TENDn
tWTH1 tWTH1
WAIT
tWTS1 tWTS1
Note : * DACKn and TENDn are the waveforms when active low is selected.
Figure 25.14 Byte Control SRAM Timing: SW = 1 Cycle, HW = 1 Cycle, One Asynchronous External Wait Cycle, CSnWCR.BAS = 0 (UB-/LB-Controlled Write Cycle)
Rev. 6.00 Jul. 15, 2009 Page 747 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Th
T1
Twx
T2
Tf
CKIO
tAD1 tAD1
A25 to A0
tCSD1 tCSD1
CSn
tWED2 tWED2
WEn
tRWD1
RD/WR
tRSD tRSD
Read
RD
tRDS1
tRDH1
D31 to D0
tRWD1 tRWD1 tRWD1
RD/WR Write D31 to D0
tBSD tBSD tWDD1 tWDH1
BS
tDACD tDACD
DACKn* TENDn
tWTH1 tWTH1
WAIT
tWTS1 tWTS1
Note : * DACKn and TENDn are the waveforms when active low is selected.
Figure 25.15 Byte Control SRAM Timing: SW = 1 Cycle, HW = 1 Cycle, One Asynchronous External Wait Cycle, CSnWCR.BAS = 1 (WE-Controlled Write Cycle)
Rev. 6.00 Jul. 15, 2009 Page 748 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.5
Synchronous DRAM Timing
Tr Tc1 Tcw Td1 Tde
CKIO
tAD1 tAD1 Row address Column address tAD1
A25 to A0
tAD1
tAD1
tAD1
A11*1
Read A command
tCSD1
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD
tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.16 Synchronous DRAM Single Read Bus Cycle (Auto-Precharge, CAS Latency = 2, WTRCD = 0 Cycle, WTRP = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 749 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Trw
Tc1
Tcw
Td1
Tde
Tap
CKIO
tAD1 tAD1 Row address Column address tAD1
A25 to A0
tAD1
tAD1
tAD1
A11*1
Read A command
tCSD1
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.17 Synchronous DRAM Single Read Bus Cycle (Auto-Precharge, CAS Latency = 2, WTRCD = 1 Cycle, WTRP = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 750 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Td1 Tr Tc1 Tc2 Tc3
Td2 Tc4
Td3
Td4 Tde
CKIO
tAD1 tAD1 Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
Row address
tAD1
tAD1 Read command
tAD1
tAD1
A11*1
tCSD1
Read A command
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2 tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.18 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Auto-Precharge, CAS Latency = 2, WTRCD = 0 Cycle, WTRP = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 751 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Td1 Tr Trw Tc1 Tc2 Tc3
Td2 Tc4
Td3
Td4 Tde
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1 Read command
tAD1
tAD1
A11*1
Read A command
tCSD1
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2 tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.19 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Auto-Precharge, CAS Latency = 2, WTRCD = 1 Cycle, WTRP = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 752 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Tc1
Trwl
CKIO
tAD1 tAD1 tAD1
A25 to A0
Row address Column address
tAD1
tAD1
tAD1
A11*1
Write A command
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.20 Synchronous DRAM Single Write Bus Cycle (Auto-Precharge, TRWL = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 753 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Trw
Trw
Tc1
Trwl
CKIO
tAD1 tAD1 Row address tAD1
A25 to A0
Column address
tAD1
tAD1
tAD1
A11*1
Write A command
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DAKCn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.21 Synchronous DRAM Single Write Bus Cycle (Auto-Precharge, WTRCD = 2 Cycles, TRWL = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 754 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Tc1
Tc2
Tc3
Tc4
Trwl
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1 Write command
tAD1
tAD1
A11*1
Write A command
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2 tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.22 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Auto-Precharge, WTRCD = 0 Cycle, TRWL = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 755 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Trw
Tc1
Tc2
Tc3
Tc4
Trwl
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1 Write command
tAD1
tAD1
A11*1
Write A command
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2 tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.23 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Auto-Precharge, WTRCD = 1 Cycle, TRWL = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 756 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Td1 Tr Tc1 Tc2 Tc3
Td2 Tc4
Td3
Td4 Tde
CKIO
tAD1 tAD1 Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
Row address
tAD1
tAD1 Read command
tAD1
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2 tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD
tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.24 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: ACT + READ Commands, CAS Latency = 2, WTRCD = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 757 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Td1 Tc1 Tc2 Tc3
Td2 Tc4
Td3
Td4 Tde
CKIO
tAD1 tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
Column address
tAD1
tAD1 Read command
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD
RD/WR
tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2 tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE DACKn*2
tDACD
tDACD
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.25 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: READ Command, Same Row Address, CAS Latency = 2, WTRCD = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 758 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Td1 Tp Tpw Tr Tc1 Tc2 Tc3
Td2 Tc4
Td3
Td4 Tde
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1
tAD1 Read command
tAD1
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tRDS2 tRDH2 tRDS2 tRDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD
tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.26 Synchronous DRAM Burst Read Bus Cycle (Single Read x 4) (Bank Active Mode: PRE + ACT + READ Commands, Different Row Addresses, CAS Latency = 2, WTRCD = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 759 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tr
Tc1
Tc2
Tc3
Tc4
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1 Write command
tAD1
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2 tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE DACKn*2
tDACD
tDACD
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.27 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: ACT + WRITE Commands, WTRCD = 0 Cycle, TRWL = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 760 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tnop
Tc1
Tc2
Tc3
Tc4
CKIO
tAD1 tAD1 Column address Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1 tAD1
tAD1 Write command
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2 tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.28 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: WRITE Command, Same Row Address, WTRCD = 0 Cycle, TRWL = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 761 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tp
Tpw
Tr
Tc1
Tc2
Tc3
Tc4
CKIO
tAD1 tAD1 Row address Column address tAD1 Column address tAD1 Column address tAD1 Column address tAD1
A25 to A0
tAD1
tAD1
tAD1 Write command
tAD1
A11*1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD tRWD
RD/WR
tRASD tRASD tRASD tRASD
RAS
tCASD tCASD
CAS
tDQMD tDQMD
DQMxx
tWDD2 tWDH2 tWDD2 tWDH2
D15 to D0
tBSD tBSD
BS
(High)
CKE
tDACD
tDACD
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.29 Synchronous DRAM Burst Write Bus Cycle (Single Write x 4) (Bank Active Mode: PRE + ACT + WRITE Commands, Different Row Addresses, WTRCD = 0 Cycle, TRWL = 0 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 762 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tp
Tpw
Trr
Trc
Trc
Trc
CKIO
tAD1 tAD1
A25 to A0
tAD1 tAD1
A11*1
tCSD1
tCSD1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD
RD/WR
tRASD tRASD tRASD tRASD
RAS
tCASD tCASD
CAS
DQMxx
(Weak keeper retained)
D15 to D0
BS
(High)
CKE
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.30 Synchronous DRAM Auto-Refreshing Timing (WTRP = 1 Cycle, WTRC = 3 Cycles)
Rev. 6.00 Jul. 15, 2009 Page 763 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tp
Tpw
Trr
Trc
Trc
Trc
Trc
CKIO
tAD1 tAD1
A25 to A0
tAD1
tAD1
A11*1
tCSD1
tCSD1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD1
RD/WR
tRASD tRASD tRASD tRASD
RAS
tCASD tCASD
CAS
DQMxx
(Weak keeper retained)
D15 to D0
BS
tCKED tCKED
CKE
DACKn *2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.31 Synchronous DRAM Self-Refreshing Timing (WTRP = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 764 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tp
Tpw
Trr
Trc
Trc
Trr
Trc
Trc
Tmw
Tde
CKIO
PALL tAD1
REF
REF
MRS tAD1 tAD1
A25 to A0
tAD1 tAD1
A11*1
tCSD1
tCSD1
tCSD1
tCSD1
tCSD1
tCSD1
tCSD1
tCSD1
CSn
tRWD tRWD tRWD tRWD tRWD
RD/WR
tRASD tRASD tRASD tRASD tRASD tRASD tRASD tRASD
RAS
tCASD tCASD tCASD tCASD tCASD tCASD
CAS
DQMxx
(Weak keeper retained)
D15 to D0
BS CKE
DACKn*2
Notes: * 1. Address pins connected to A10 in SDRAM 2. DACKn is the waveform when active low is selected.
Figure 25.32 Synchronous DRAM Mode Register Write Timing (WTRP = 1 Cycle)
Rev. 6.00 Jul. 15, 2009 Page 765 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.6
PCMCIA Timing
Tpcm1 CKIO
tAD1
Tpcm1w
Tpcm1w
Tpcm1w
Tpcm2
A25 to A0 tCSD1 CExx tRWD1 RD/WR tRSD RD tRDH1 Read D15 to D0 tWED WE Write D15 to D0 tBSD BS tBSD tWDH5 tWDD1 tWDH1 tWED tRDS1 tRSD tRWD1
Figure 25.33 PCMCIA Memory Card Interface Bus Timing
Rev. 6.00 Jul. 15, 2009 Page 766 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tpcm0
Tpcm0w
Tpcm1
Tpcm1w
Tpcm1w
Tpcm1w
Tpcm1w
Tpcm2
Tpcm2w
CKIO
tAD1 tAD1
A25 to A0
tCSD1 tCSD1
CExx
tRWD1 tRWD1
RD/WR
tRSD tRSD
RD Read D15 to D0
tWED tWED
tRDH1 tRDS1
WE Write D15 to D0
tBSD tBSD tWTH tWTS tWTH tWTS tWDD1
tWDH5 tWDH1
BS WAIT
Figure 25.34 PCMCIA Memory Card Interface Bus Timing (TED = 2.5 Cycles, TEH = 1.5 Cycles, One Software Wait Cycle, One External Wait Cycle)
Rev. 6.00 Jul. 15, 2009 Page 767 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tpci1 CKIO tAD1 A25 to A0 tCSD1 CExx tRWD1 RD/WR tICRSD ICIORD Read D15 to D0 tICWSD ICIOWR Write D15 to D0 tBSD BS tWDD1
Tpci1w
Tpci1w
Tpci1w
Tpci2
tAD1
tCSD1
tRWD1
tICRSD tRDH1 tRDS1
tICWSD tWDH5 tWDH1
tBSD
Figure 25.35 PCMCIA I/O Card Interface Bus Timing
Rev. 6.00 Jul. 15, 2009 Page 768 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Tpci0
Tpci0w
Tpci1
Tpci1w
Tpci1w
Tpci1w
Tpci1w
Tpci2
Tpci2w
CKIO tAD1 A25 to A0 tCSD1 CExx tRWD1 RD/WR tICRSD ICIORD Read D15 to D0 tICWSD ICIOWR Write D15 to D0 tBSD BS tBSD tWTH tWTS
WAIT
tAD1
tCSD1
tRWD1
tICRSD tRDH1 tRDS1
tICWSD tWDH5
tWDD1
tWDH1
tWTH tWTS
tIO16S
IOIS16
tIO16H
Figure 25.36 PCMCIA I/O Card Interface Bus Timing (TED = 2.5 Cycles, TEH = 1.5 Cycles, One Software Wait Cycle, One External Wait Cycle)
Rev. 6.00 Jul. 15, 2009 Page 769 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.7
DMAC Signal Timing
Table 25.10 DMAC Signal Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item DREQn set-up time DREQn hold time TENDn, DACKn delay time Symbol Min. tDRQS tDRQH tDACD 10 10 Max. 10 Unit ns ns ns Reference Figures Figure 25.37 Figure 25.37 Figure 25.38
CKIO tDRQS tDRQH DREQn
Figure 25.37 DREQ Input Timing
CKIO tDACD TENDn DACKn tDACD
Figure 25.38 TENDn, DACKn Output Timing
Rev. 6.00 Jul. 15, 2009 Page 770 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.8
SCIF Timing
Table 25.11 SCIF Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Input clock cycle Symbol Min. Max. Clock synchronous tScyc Asynchronous tSCKR tSCKF tSCKW tTXD tRXS tRXH tRTSD tCTSS tCTSH 12 4 0.4 3 3 100 100 0.8 0.8 0.6 100 tpcyc tpcyc tScyc Figure 25.40 tpcyc tpcyc ns ns ns Unit tpcyc Reference Figures Figures 25.39 and 25.40 Figure 25.39
Input clock rising time Input clock falling time Input clock pulse width Transmit data delay time Receive data setup time (clocked synchronous) Receive data hold time (clocked synchronous) RTS delay time CTS setup time (clocked synchronous) CTS hold time (clocked synchronous) Note: *
3 x tpcyc*+ 50 ns
tpcyc indicates the period of the peripheral module clock (P).
tSCKW SCK
tSCKR
tSCKF
tScyc
Figure 25.39 SCK Input Clock Timing
Rev. 6.00 Jul. 15, 2009 Page 771 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
tScyc SCK tTXD TxD (data transmission) tRXS RxD (data reception) tRTSD RTS tCTSS CTS tCTSH tRXH
Figure 25.40 SCI Input/Output Timing in Clocked Synchronous Mode 25.4.9 SIOF Module Signal Timing
Table 25.12 SCIF Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item SIOMCLK clock input cycle time SIOMCLK input high pulse width SIOMCLK input low pulse width SCK_SIO clock cycle time SCK_SIO output high pulse width SCK_SIO output low pulse width SIOFSYNC output delay time SCK_SIO input high pulse width SCK_SIO input low pulse width SIOFSYNC input set-up time SIOFSYNC input hold time Symbol tMcyc tMWH tMWL tSIcyc tSWHO tSWLO tFSD tSWHI tSWLI tFSS tFSH Min. 32 0.4 x tMcyc 0.4 x tMcyc 2 x tpcyc* 0.4 x tSIcyc 0.4 x tSIcyc 0.4 x tSIcyc 0.4 x tSIcyc 20 20 Max. 20 Figure 25.46 Figures 25.42 to 25.46 Figures 25.42 to 25.45 Unit ns Reference Figures Figure 25.41
Rev. 6.00 Jul. 15, 2009 Page 772 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
Item TXD_SIO output delay time RXD_SIO input set-up time RXD_SIO input hold time Note: *
Symbol tSTDD tSRDS tSRDH
Min. 20 20
Max. 20
Unit ns
Reference Figures Figures 25.42 to 25.46
tpcyc indicates the period of the peripheral module clock (P).
tMcyc
SIOMCLK
tMWH
tMWL
Figure 25.41 SIOMCLK Input Timing
tSIcyc tSWHO
SCK_SIO (output)
tSWLO
tFSD
tFSD
SIOFSYNC (output)
tSTDD
TXD_SIO
tSTDD
tSRDS
RXD_SIO
tSRDH
Figure 25.42 SIOF Transmit/Receive Timing (Master Mode 1/Falling Edge Sampling)
Rev. 6.00 Jul. 15, 2009 Page 773 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
tSIcyc tSWHO
SCK_SIO (output)
tSWLO
tFSD
tFSD
SIOFSYNC (output)
tSTDD
TXD_SIO
tSTDD
tSRDS
RXD_SIO
tSRDH
Figure 25.43 SIOF Transmit/Receive Timing (Master Mode 1/Rising Edge Sampling)
tSIcyc tSWHO
SCK_SIO (output)
tSWLO
tFSD
tFSD
SIOFSYNC (output)
tSTDD
TXD_SIO
tSTDD
tSTDD
tSTDD
tSRDS tSRDH
RXD_SIO
Figure 25.44 SIOF Transmit/Receive Timing (Master Mode 2/Falling Edge Sampling)
Rev. 6.00 Jul. 15, 2009 Page 774 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
tSIcyc tSWHO
SCK_SIO (output)
tSWLO
tFSD
tFSD
SIOFSYNC (output)
tSTDD
TXD_SIO
tSTDD
tSTDD
tSTDD
tSRDS tSRDH
RXD_SIO
Figure 25.45 SIOF Transmit/Receive Timing (Master Mode 2/Rising Edge Sampling)
tSIcyc tSWHI
SCK_SIO (input)
tSWLI
tFSS
SIOFSYNC (input)
tFSH
tSTDD
TXD_SIO
tSTDD
tSRDS
RXD_SIO
tSRDH
Figure 25.46 SIOF Transmit/Receive Timing (Slave Mode 1/ Slave Mode 2)
Rev. 6.00 Jul. 15, 2009 Page 775 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.10 Port Timing Table 25.13 Port Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Output data delay time Input data setup time Input data hold time Symbol tPORTD tPORTS tPORTH Min. 16 10 Max. 20 Unit ns ns ns Reference Figures Figure 25.47
CKIO tPORTS tPORTH
Ports A to E (read)
tPORTD
Ports A to E (write)
Figure 25.47 I/O Port Timing
Rev. 6.00 Jul. 15, 2009 Page 776 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.11 HIF Timing Table 25.14 HIF Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item Read bus cycle time Write bus cycle time Address setup time (HIFSCR.DMD = 0) Address setup time (HIFSCR.DMD = 1) Address hold time (HIFSCR.DMD = 0) Address hold time (HIFSCR.DMD = 1) Read low width (read) Write low width (write) Read/write high width Read data delay time Read data hold time Write data setup time Write data hold time HIFINT output delay time HIFRDY output delay time HIFDREQ output delay time HIF pin enable delay time HIF pin disable delay time Symbol Min. tHIFCYCR tHIFCYCW tHIFAS tHIFAS tHIFAH tHIFAH tHIFWRL tHIFWWL tHIFWRWH tHIFRDD tHIFRDH tHIFWDS tHIFWDH tHIFITD tHIFRYD tHIFDQD tHIFEBD tHIFDBD 4 4 16 0 16 0 2.5 2.5 2.0 0 tpcyc + 10 10 Max. 2 x tpcyc + 16 20 10 20 20 20 Unit tpcyc tpcyc ns ns ns ns tpcyc tpcyc tpcyc ns ns ns ns ns tpcyc ns ns ns Figure 25.49 Figure 25.50 Figure 25.49 Figure 25.50 Reference Figures Figure 25.48
Notes: 1. tpcyc indicates the period of the peripheral module clock (P). 2. tHIFAS is given from the start of the time over which both the HIFCS and HIFRD (or HIFWR) signals are low levels. 3. tHIFAH is given from the end of the time over which both the HIFCS and HIFRD (or HIFWR) signals are low levels. 4. tHIFWRL is given as the time over which both the HIFCS and HIFRD signals are low levels. 5. tHIFWWL is given as the time over which both the HIFCS and HIFWR signals are low levels. 6. When reading the register specified by bits REG5 to REG0 after writing to the HIF index register (HIFIDX), tHIFWRWH (min.) = 2 x tpcyc + 5 ns.
Rev. 6.00 Jul. 15, 2009 Page 777 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
tHIFCYCR
HIFRS
tHIFCYCW
tHIFWRL
HIFCS
tHIFWWL
tHIFAS
HIFRD HIFWR
tHIFAH tHIFWRWH tHIFRDD tHIFRDH
Read data
tHIFAS
tHIFAH
tHIFWDS tHIFWDH
Write data
HIFD15 to HIFD00
Figure 25.48 HIF Access Timing
CKIO tHIFITD HIFINT tHIFDQD HIFDREQ
Figure 25.49 HIFINT and HIFDREQ Timing
Rev. 6.00 Jul. 15, 2009 Page 778 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
HIFEBL HIFINT HIFDREQ HIFRDY HIFD15 to HIFD0 RES tHIFRYD HIFRDY tHIFRYD tHIFDBD tHIFEBD
Figure 25.50 HIFRDY and HIF Pin Enable/Disable Timing
Rev. 6.00 Jul. 15, 2009 Page 779 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.12 EtherC Timing Note: These characteristics are valid in the case of utilizing the external PHY LSI. For example, "MDIO output" means that the MDIO input/output function is selected as the function of the pin PC16/MDIO, and the pin is used as the MDIO output pin of the on-chip EtherC.
Table 25.15 EtherC Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item TX-CLK cycle time TX-EN output delay time MII_TXD[3:0] output delay time CRS setup time CRS hold time COL setup time COL hold time RX-CLK cycle time RX-DV setup time RX-DV hold time MII_RXD[3:0] setup time MII_RXD[3:0] hold time RX-ER setup time RX-ER hold time MDIO setup time MDIO hold time MDIO output data hold time WOL output delay time EXOUT output delay time Symbol tTcyc tTENd tMTDd tCRSs tCRSh tCOLs tCOLh tRcyc tRDVs tRDVh tMRDs tMRDh tRERs tRERh tMDIOs tMDIOh tMDIOdh tWOLd tEXOUTd Min. 40 1 1 10 10 10 10 40 10 10 10 10 10 10 10 10 5 1 1 Max. 20 20 18 20 20 Unit ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns Figure 25.56 Figure 25.57 Figure 25.58 Figure 25.55 Figure 25.54 Figure 25.53 Figure 25.52 Reference Figures Figure 25.51
Rev. 6.00 Jul. 15, 2009 Page 780 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
TX-CLK tTENd TX-EN tMTDd MII_TXD[3:0] Preamble SFD DATA CRC
TX-ER tCRSs CRS tCRSh
COL
Figure 25.51 MII Transmission Timing (Normal Operation)
TX-CLK
TX-EN
MII_TXD[3:0]
Preamble
JAM
TX-ER
CRS tCOLs COL tCOLh
Figure 25.52 MII Transmission Timing (Collision Occurred)
Rev. 6.00 Jul. 15, 2009 Page 781 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
RX-CLK tRDVs RX-EN tMRDs MII_RXD[3:0] Preamble SFD DATA CRC tMRDh tRDVh
RX-ER
Figure 25.53 MII Reception Timing (Normal Operation)
RX-CLK
RX-EN
MII_RXD[3:0]
Preamble
SFD
DATA tRERs tRERh
xxxx
RX-ER
Figure 25.54 MII Reception Timing (Error Occurred)
MDC tMDIOs MDIO tMDIOh
Figure 25.55 MDIO Input Timing
MDC tMDIOdh MDIO
Figure 25.56 MDIO Output Timing
Rev. 6.00 Jul. 15, 2009 Page 782 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
RX-CLK tWOLd WOL
Figure 25.57 WOL Output Timing
CKIO tEXOUTd EXOUT
Figure 25.58 EXOUT Output Timing 25.4.13 H-UDI Related Pin Timing Table 25.16 H-UDI Related Pin Timing Conditions: VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Item TCK cycle time TCK high pulse width TCK low pulse width TCK rising/falling time TRST setup time TRST hold time TDI setup time TDI hold time TMS setup time TMS hold time TDO delay time Note: * Symbol tTCKcyc tTCKH tTCKL tTCKrf tTRSTS tTRSTH tTDIS tTDIH tTMSS tTMSH tTDOD Min. 50 19 19 10 50 10 10 10 10 Max. 4 19 Unit ns ns ns ns tbcyc* tbcyc* ns ns ns ns ns Figure 25.61 Figure 25.60 Reference Figures Figure 25.59
tbcyc indicates the period of the external bus clock (B).
Rev. 6.00 Jul. 15, 2009 Page 783 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
tTCKcyc tTCKH tTCKL VIH VIH 1/2 VccQ VIL tTCKrf VIL tTCKrf VIH 1/2 VccQ
Figure 25.59 TCK Input Timing
RES tTRSTS TRST tTRSTH
Figure 25.60 TCK Input Timing in Reset Hold State
tTCKcyc
TCK tTDIS TDI tTMSS TMS tTDOD TDO tTMSH tTDIH
Figure 25.61 H-UDI Data Transmission Timing
Rev. 6.00 Jul. 15, 2009 Page 784 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.4.14 AC Characteristic Test Conditions * I/O signal reference level: VCCQ/2 (VCCQ = 3.0 V to 3.6 V, VCC = 1.71 V to 1.89 V) * Input pulse level: VSS to VCCQ (RES, NMI, IRQ7 to IRQ0, MD5, MD3 to MD0, ASEMD, TESTMD, HIFMD, TRST, and EXTAL), VSS to 3.0 V (other pins) * Input rising and falling times: 1 ns
IOL
LSI output pin CL
DUT output VREF
IOH
Notes: 1. CL is the total value that includes the capacitance of measurement instruments, etc., and is set for all pins as 30 pF. 2. IOL and IOH are shown in table 25.5.
Figure 25.62 Output Load Circuit
Rev. 6.00 Jul. 15, 2009 Page 785 of 816 REJ09B0237-0600
Section 25 Electrical Characteristics
25.5
Physical Layer Ttransceiver (PHY) Characteristics (Reference Values)
Table 25.17 shows the characteristics of the physical layer transceiver (PHY). Table 25.17 PHY Characteristics Conditions: VCC1A = VCC2A = VCC3A = 3.3 V; for Ta, see the operating temperatures given in appendix B, Product Code Lineup.
Symbol 100BASE-TX output VOH100 high level 100BASE-TX output VOM100 middle level 100BASE-TX output VOL100 low level 10BASE-TX output high level VOH10 Min. +0.95 -50 -1.05 2.2 Typ. Max. +1.05 +50 -0.95 2.8 Test Unit Conditions V
Item Transformer secondary-side differential output voltage
mV V V
Rev. 6.00 Jul. 15, 2009 Page 786 of 816 REJ09B0237-0600
Appendix
Appendix
A. Port States in Each Pin State
Port States in Each Pin State
Reset State Classification Clock Power-On (HIFMD = Low) I O* O* I I I
1
Table A.1
Power-Down Mode Software Standby I H-UDI Module Standby I
1
Abbr. EXTAL XTAL CKIO CK_PHY
Power-On (HIFMD = High) I O* O* I I I
1
Sleep I
O*
1
O*
5
O* O* I I I
1
1
1
ZO* I I I
O* I I I
1
1
System control
RES
Operating MD5, MD3 to MD0 mode control Interrupt NMI IRQ7 to IRQ0 Address bus Data bus A25 to A16 A15 to A0 D31 to D16 D15 to D0 Bus control WAIT IOIS16 CKE CAS, RAS WE0/DQMLL
I O Z H
I O Z H H
I I ZHL* ZHL* Z Z Z Z ZO* ZO* ZH* ZH*
2 4
I I O O IO IO I I O O O O O
I I O O IO IO I I O O O O O
4
2
4
WE1/DQMLU/ H WE WE2/DQMUL/ ICIORD
4
ZH*
4
Rev. 6.00 Jul. 15, 2009 Page 787 of 816 REJ09B0237-0600
Appendix
Reset State Classification Bus control Power-On (HIFMD = Low) Power-On (HIFMD = High) H H H Software Standby ZH* ZH* ZH* ZH* ZH*
4
Power-Down Mode H-UDI Module Standby O O O O O O O O I O I I I O O I I I IO O I O O
Abbr.
Sleep O O O O O O O O I O I I I O O I I I IO O I O O
WE3/DQMUU/ ICIOWR RD RDWR CE2B, CE2A CS6B/CE1B, CS5B/CE1A CS4, CS3 CS0 BS H H H
4
4
4
4
ZH* ZH*
4
4
ZH* I O I I I O O I I I IO O Z Z Z
4
Ethernet controller
ERXD3 to ERXD0 ETXD3 to ETXD0 RX_DV RX_ER RX_CLK TX_ER TX_EN TX_CLK COL CRS MDIO MDC LNKSTA EXOUT WOL
Rev. 6.00 Jul. 15, 2009 Page 788 of 816 REJ09B0237-0600
Appendix
Reset State Classification DMAC Power-On (HIFMD = Low) Power-On (HIFMD = High) Z O Z I Z Z Z Z Z Z Software Standby Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z O Z I Z Z Z Z Z Z
Power-Down Mode H-UDI Module Standby I O O O I O I O I I O O O I I
3
Abbr. DREQ1, DREQ0 DACK1, DACK0 TEND1, TEND0
Sleep I O O O I O I O I I O O O I I O* O* I*
3
SCIF
TxD2 to TxD0 RxD2 to RxD0 SCK2, SCK1 SCK0 RTS1, RTS0 CTS1, CTS0 I
SIOF
SIOMCLK0 SCK_SIO0 SIOFSYNC0 TXD_SIO0 RXD_SIO0
Host interface
HIFEBL HIFRDY HIFDREQ HIFMD HIFINT HIFRD HIFWR HIFRS HIFCS HIFD15 to HIFD0
O* O* I*
3
3
3
3
O* I*
3
3
O* I* I* I* I*
3 3
3
I* I* I*
3
3
3
3
3
3
IO*
IO*
3
Rev. 6.00 Jul. 15, 2009 Page 789 of 816 REJ09B0237-0600
Appendix
Reset State Classification Power-On (HIFMD = Low) I I I I Z I Power-On (HIFMD = High) I I I I Z I Z Z Z Z I O O O I I I Z Software Standby I I I I ZO* I Z Z Z Z Z Z I O O O I I O O O O I Z
6
Power-Down Mode H-UDI Module Standby I I I I
6
Abbr.
Sleep I I I I ZO* I P P P P P P I O O O I I O O O O I Z
User TRST debugging TCK interface TMS (H-UDI) TDI TDO ASEMD I/O port
Z I I/O I/O I/O I/O I/O I/O I O O O I I O O O O I Z
PA25 to PA16 Z PB13 to PB0 PC20 to PC0 PD7 to PD0 PE24 to PE4, PE2 to PE0 PE3 Z Z Z Z I O O O I I I Z
Test mode TESTMD TESTOUT PHY TxP TxM RxP RxM SPEED100 LINK CRS DUPLEX EXRES1 TSTBUSA
[Legend] : This pin function is not selected as an initial state. I: Input O: Output IO: Input/output H: High level output L: Low level output
Rev. 6.00 Jul. 15, 2009 Page 790 of 816 REJ09B0237-0600
Appendix
Z: High-impedance P: Input or output depending on the register setting Notes: 1. Depends on the clock mode (setting of pins MD2 to MD0). 2. Depends on the HIZCNT bit in CMNCR. 3. High-impedance when HIFEBL = low 4. Depends on the HIZMEM bit in CMNCR. 5. Depends on the HIZCNT bit in CMNCR or the CKOEN bit in FRQCR. 6. This pin becomes output state only when reading data from the H-UDI and retains highimpedance state when the pin is not output state. 7. In all pins having the weak keeper circuit, even with the "Z" (meaning high-impedance) description, each weak keeper circuit is always operating. For details on the weak keeper circuit, see section 19.6, Usage Notes.
Rev. 6.00 Jul. 15, 2009 Page 791 of 816 REJ09B0237-0600
Appendix
B.
Product Code Lineup
Catalogue Code Operating Solder ball Temperature Composition -20 to 70C -20 to 85C -20 to 85C -40 to 85C -20 to 70C -20 to 85C -20 to 85C -40 to 85C -20 to 70C -20 to 85C -20 to 85C -40 to 85C Pb-free solder Pb-free solder Pb-free solder Pb-free solder Non-Pb-free solder Non-Pb-free solder Non-Pb-free solder Non-Pb-free solder Pb-free solder Pb-free solder Pb-free solder Pb-free solder Package Code PLBG0176GA-A
Product Code
DS76190B125BGV R4S76190B125BGV DS76190N125BGV R4S76190N125BGV DS76190W125BGV R4S76190W125BGV DS76190D125BGV R4S76190D125BGV DS76190B125BG DS76190N125BG DS76190W125BG DS76190D125BG R4S76190B125BG R4S76190N125BG R4S76190W125BG R4S76190D125BG
DS76191B125BGV R4S76191B125BGV DS76191N125BGV R4S76191N125BGV DS76191W125BGV R4S76191W125BGV DS76191D125BGV R4S76191D125BGV
Rev. 6.00 Jul. 15, 2009 Page 792 of 816 REJ09B0237-0600
Appendix
C.
Package Dimensions
RENESAS Code PLBG0176GA-A D wSA wSB Previous Code BP-176/BP-176V MASS[Typ.] 0.45g
JEITA Package Code P-LFBGA176-13x13-0.80
x4
v y1 S
S
E
y S e A ZD
Reference Dimension in Millimeters Symbol Min Nom Max
A1
A
e
R P N M L K J H G F E D
D E v B w A A1 e b x 0.45 0.35
13.0 13.0 0.15 0.20 1.40 0.40 0.80 0.50 0.45 0.55 0.08 0.10 0.2
ZE
C B A
y y1 SD
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15
SE ZD ZE 0.90 0.90
b
x M S A B
Figure C.1 Package Dimensions (BP-176)
Rev. 6.00 Jul. 15, 2009 Page 793 of 816 REJ09B0237-0600
Appendix
Rev. 6.00 Jul. 15, 2009 Page 794 of 816 REJ09B0237-0600
Main Revisions and Additions in this Edition
Item Page Revision (See Manual for Details) Amended
Items Specification MAC (Media Access Control) function Data frame assembly/disassembly (frame format conforming to IEEE802.3) CSMA/CD link management (collision prevention and collision processing) CRC processing 512 bytes each for transmit/receive FIFO Full-duplex transmit/receive support Short frame/long frame detectable Ethernet * controller (EtherC)
Table 1.1 Features of SH7619 4
Table 1.2 Pin Functions
16
Amended
Classification Abbr. Description Input/output pin for testing the onchip PHY. This pin should be open.
TSTBUSA Physical layer transceiver (PHY)
6.6.1 Interrupt Sequence
102
Deleted 4. The CPU ... Instead of executing the decoded instruction, the CPU starts interrupt exception handling (see figure 6.5).
6.7 Interrupt Response Time 104
Deleted Table 6.3 lists ... handling routine begins. Figure 6.5 shows an example of the pipeline operation when an IRQ interrupt is accepted.
Table 7.12 Relationship 160, between Register Settings 161 (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (1)
Deleted and amended
Setting A2/3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0] Setting A2/3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
Rev. 6.00 Jul. 15, 2009 Page 795 of 816 REJ09B0237-0600
Item
Page Revision (See Manual for Details) Deleted and amended
Setting A2/3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0] Setting A2/3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
Table 7.13 Relationship 161, between Register Settings 162 (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (2)
Table 7.14 Relationship 163 between Register Settings (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (3)
Deleted and amended
Setting A2/3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
Table 7.15 Relationship 164, between Register Settings 165 (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (4)
Deleted
Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0] Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
165, Table 7.16 Relationship 166 between Register Settings (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (5)
Deleted
Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0] Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
167, Table 7.17 Relationship 168 between Register Settings (A3BSZ[1:0], A3ROW[1:0], and A3COL[1:0]) and Address Multiplex Output (6)
Deleted
Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0] Setting A3 BSZ [1:0] A3 ROW [1:0] A3 COL [1:0]
11.4 Operation
253
Amended The overview of the Ethernet controller (EtherC) are shown below. The EtherC transmits and receives PAUSE frames conforming to the Ethernet/IEEE802.3x frames.
Rev. 6.00 Jul. 15, 2009 Page 796 of 816 REJ09B0237-0600
Item Figure 11.5 MII Management Frame Format
Page Revision (See Manual for Details) 258 Amended [Legend] IDLE: Wait time until next MII management format input (a) Write: Independent bus release (notation: X) performed (b) Read: Bus already released in TA; data control unnecessary
11.6 Usage Notes * * Flow Control Defect 1 Flow Control Defect 2
264, 265
Added Note: This defect may be generated only in the R4S76190. In the R4S76191, the defect has been corrected. Amended
Bit Description
12.2.6 EtherC/E-DMAC Status Register (EESR)
275
21
Frame Transmit Complete Indicates that all the data specified by the transmit descriptor has been transmitted to the EtherC. The transfer status is written back to the relevant descriptor. For 1-frame/1-buffer processing, when 1-frame transmission is completed and the transmission descriptor valid bit (TACT) in the next descriptor is not set, transmission is completed and this bit is set to 1. Likewise, for multiple-frame buffer processing, when the last data in the frame is transmitted and the transmission descriptor valid bit (TACT) in the next descriptor is not set, transmission is completed and this bit is set to 1. After frame transmission, the E-DMAC writes the transmission status back to the descriptor. 0: Transfer not complete, or no transfer directive 1: Transfer complete
13.3.4 DMA Channel Control Registers 0 to 3 (CHCR_0 to CHCR_3) [Notice] [Workaround]
335
Added
Rev. 6.00 Jul. 15, 2009 Page 797 of 816 REJ09B0237-0600
Item 13.3.5 DMA Operation Register (DMAOR) [Notice] [Workaround] 15.3.9 FIFO Control Register (SCFCR)
Page Revision (See Manual for Details) 338 Added
407
Amended
Bit 3 Description Modem Control Enable Enables modem control signals CTS and RTS. In synchronous mode, clear this bit to 0. This bit is available only in SCFCR_0 and SCFCR_1. In SCFCR_2, this bit is reserved. The initial value is 0 and the write value should always be 0. 0: Modem signal disabled* 1: Modem signal enabled Note: * The CTS pin state has no effect on transmit operations regardless of the input value. The RTS pin state has no effect on receive operations, either.
16.3.1 Mode Register (SIMDR)
450
Amended
Bit 5 Initial Bit Name Value 0 R/W R Description Reserved This bit is always read as 0. The write value should always be 0.
Rev. 6.00 Jul. 15, 2009 Page 798 of 816 REJ09B0237-0600
Item
Page Revision (See Manual for Details) Added SIRDR is a 32-bit read-only register that reads receive data of the SIOF. SIRDR stores data in the receive FIFO and is initialized to undefined value by the conditions specified in section 24, List of Registers, or by a receive reset caused by the RXRST bit in SICTR. Amended
Bit 31 to 16 15 to 0 Bit Name SIRDL 15 to 0 SIRDR 15 to 0 Initial Value Undefined Undefined R/W R R
16.3.4 Receive Data Register 456 (SIRDR)
16.3.7 Status Register (SISTR)
464
Deleted
Bit 0 Description Receive FIFO Overflow 0: No receive FIFO overflow 1: Receive FIFO overflow A receive FIFO overflow means that writing has occurred when the receive FIFO is full. When a receive FIFO overflow occurs, the SIOF indicates overflow, and receive data is lost. * * This bit is valid when the RXE bit in SICTR is 1. When 1 is written to this bit, the contents are cleared. Writing 0 to this bit is invalid.
*
If the issue of interrupts by this bit is enabled, an SIOF interrupt is issued.
Table 16.7 Audio Mode 482 Specification for Receive Data
Deleted Note: Left and right same audio mode is not supported in receive data. To execute 8-bit monaural transmission or reception, use the left channel.
Rev. 6.00 Jul. 15, 2009 Page 799 of 816 REJ09B0237-0600
Item 16.4.7 Transmit and Receive Procedures Transmission/Reception and Transmission in Master Mode: Figure 16.9 (1) Transmission/Reception Operation in Master Mode (Example of Reception and Full-Duplex Transmission by the CPU with TDMAE=0)
Page Revision (See Manual for Details) 487 Amended Figure 16.9 (1) shows an example of settings and operation for master mode transmission/reception. Figure 16.9 (2) shows an example of settings and operation for master mode transmission. 488 Replaced from Figure 16.9, Example of Transmit Operation in Master Mode
Figure 16.9 (2) Transmission 489 Operation in Master Mode (Example of Half-Duplex Transmission by the CPU with TDMAE=0) 16.4.9 Transmit and Receive Timing [Notes on Usage] 18.2 Notes on Usage 19.6 Usage Notes 577 591 500, 501
Added
Added
Added Amended 2. The weak keeper circuit is included in all pins except MD5, MD3, MD2, MD1, MD0, ASEMD, TESTMD, EXTAL, XTAL, TxP, TxM, RxP, RxM, EXRES1, and TSTBUSA. The weak keeper is a circuit, always operating while the power is on, that fixes the input in I/O pins to low or high when the pins are not driven from outside. Notes on processing the input pins are as follows: When using pins having the weak keeper circuit as input pins and driving these pins to a certain level from outside, adjust the resistance of pull-up/pulldown resistors to let the weak keeper circuit keep the intended levels. (2 k and 8 k are recommended respectively.) The larger the resistance is, the longer the transition time is. In addition, a large resistance may fail to let the weak keeper circuit to keep the intended levels. Therefore, when the resistors adjusted comparatively large are used, ensure that any transition does not delay in the system.
Rev. 6.00 Jul. 15, 2009 Page 800 of 816 REJ09B0237-0600
Item
Page Revision (See Manual for Details) Amended
Figure 22.1 The Block 632 Diagram around PHY Module
TX-CLK MDC MDIO
CO_TX_CLK CO_MDC CO_MDI CO_MDO
22.4.1 Serial Management Interface (SMI)
635
Amended The Serial Management Interface is used to control this PHY core and obtain its status. This interface supports registers 0 through 6 as required by Clause 22 of the IEEE802.3 standard. Non-supported registers (7 to 15) will be read as hexadecimal "FFFF".
Figure 22.3 How to Derive MDIO Signal from Core Signals
635
Amended
CO_MDIO_DIR ENB CO_MDO CO_MDI
22.4.1 Serial Management Interface (SMI)
635
Amended The CO_MDC signal is an a-periodic clock provided by the station management controller (SMC), part of the EtherC. The CO_MDI signal receives serial data (commands) from the controller SMC. The CO_MDO sends serial data (status) to the SMC. Amended
Output on the rising edge Latch on the rising edge
Figure 22.5 MDIO Timing and 636 Frame Structure (WRITE Cycle)
R2 R1 R0
D15 D14
... ...
Data
D1
D0
ter Address
Turn Around
Rev. 6.00 Jul. 15, 2009 Page 801 of 816 REJ09B0237-0600
Item Figure 22.7 Receive Data Path
Page Revision (See Manual for Details) 651 Amended
25MHz by 5 bits Descrambler and SIPO
22.6 100Base-TX Receive (4) Descrambling
652
Deleted Special logic in the descrambler ensures synchronization with the remote PHY by searching for IDLE symbols within a window of 4000 bytes (40us). This window ensures that a maximum packet size of 1514 bytes, allowed by the IEEE 802.3 standard, can be received with no interference.
22.11 Internal I/O Signals * Management signals
667
Amended
Signal Name CO_MDI CO_MDO CO_MDC CO_MDIO_DIR Type I O I O Description Management Data Input: Serial management data input. Management Data Output: Serial management data output. Management Clock: Serial management clock. Management Data Direction: May be used to control output enabled buffer for MDIO.
22.13 Usage Notes
669
Deleted (4) Waveform Adjustment for Tx100 Output
Rev. 6.00 Jul. 15, 2009 Page 802 of 816 REJ09B0237-0600
Item * Meanings of the value written to register 23
Page Revision (See Manual for Details) 670 Amended
Bit 8 7 Description These bits adjust the slope. 00: Three steps up 01: Two steps up 10: One step up 11: Regular 3 2 These bits adjust the transition time. 00: One step up 01: One step down 10: Regular 11: Two steps down
Figure 22.10 Role of Each Bit Field (Example of Rising Waveform) Slope is Controlled in Four Segments (b) Adjustment Register for Tx10 Waveform Output (c) Detailed Descriptions (d) Other Control Methods
Deleted
672 to Added 677
Rev. 6.00 Jul. 15, 2009 Page 803 of 816 REJ09B0237-0600
Item Figure 22.10 Example of Connection with a Pulse Transformer (RJ45)
Page Revision (See Manual for Details) 679 Amended
SH_TxP SH_TxM SH_RxP SH_RxM
R4*
C1
1
1 1
R5*
2 2 82[ohm]
1
82[ohm]
2
6.8nF/16V C2
Note:
PVCC: Analog power supply PVSS: Analog ground * R4, R5: Please set the terminating resistance as 50 ohm, summing up with both side of the magnetic (even if the magnetic is in the RJ45 connector).
23.3.1 The Procedures of Setting Up the On-Chip PHY
689
Amended 3. Activation of the on-chip PHY module To activate the on-chip PHY module, set the pin function registers of Port C as something but EtherC function, that is, I/O ports and LED outputs of the onchip PHY. * * * PCCRH2 = H'0000 PCCRL1 = H'0000 PCCRL2 = H'FF00
........ 23.3.2 The Procedures of Set 690 Up the External PHY LSI Amended In the case of utilizing the external PHY LSI, select the EtherC function of the pin function controllers and then set up the internal registers of the PHY LSI with the MII management frame. 1. Activation of the external PHY LSI. Select the EtherC functions with pin function controller. * * * PCCRH2 = H'0155 PCCRL1 = H'5555 PCCRL2 = H'5555
Rev. 6.00 Jul. 15, 2009 Page 804 of 816 REJ09B0237-0600
Item 24.2 Register Bits
Page Revision (See Manual for Details) 707 Amended
Register Abbreviation SIMDR Bit 31/23/15/7 TRMD1 TXDIZ SISCR MSSEL Bit 30/22/14/6 TRMD0 RCIM MSIMM Bit 29/21/13/5 SYNCAT Bit 28/20/12/4 REDG SYNCDL BRPS4
25.2 Power-On and Power-Off 731 Order
Added * Power-off order In the reverse order of power-on, first turn off the 1.8-V system power, then turn off the 3.3-V system power within 10 ms. This time should be as short as possible. The system design must ensure that the states of pins or undefined period of an internal state do not cause erroneous system operation. In some systems, Vcc may exceed 3.3-V system power (Vcc > 3.3-V system power) temporarily, on the falling edge. Even in this case, the inverted potential difference must be 0.3 V or less.
Rev. 6.00 Jul. 15, 2009 Page 805 of 816 REJ09B0237-0600
Item
Page Revision (See Manual for Details) Amended
25.2 Power-On and Power-Off 731 Order
max 0.3V Vcc/2 tPWD Operation stopped
Table 25.7 Clock Timing
735, 736
Amended
Item CK_PHY clock input frequency CK_PHY clock input cycle time CK_PHY clock input low pulse width RES assert time Symbol fCKPHY TCKPHYcyc tCKPHYL tRESW Min. Max. Unit. 25 -100 25 +100 MHz 1 1 ppm* ppm* 39.996 12 20 40.004 ns ns tbcyc*
2
Notes: 1. Error margin means frequency tolerance (reference value). Recommending under 100 ps of peak to peak jitter. 2. tbcyc indicates the period of the external bus clock (B).
Rev. 6.00 Jul. 15, 2009 Page 806 of 816 REJ09B0237-0600
Item Table 25.9 Bus Timing
Page Revision (See Manual for Details) 742 Added Item Write data hold time 2 Write data hold time 3 WAIT setup time WAIT hold time Symbol tWDH2 tWDH3 tWTS1* tWTH1* Min. 2 0 1/2 x tbcyc + 11 1/2 x tbcyc + 10
Note: * The AC timing specification of WAIT is as follows. Input setup time + hold time of WAIT = 11 [ns] + 10 [ns] = 21 [ns] As the frequency, 47.62 [MHz] Therefore, when the bus clock is 47.62 MHz or more, at least either setup time or hold time cannot be satisfied during 1-bus clock. The following notes should be confirmed. * When the hardware-wait function is used synchronously The bus clock frequency must be low enough to satisfy the AC specification above. * When the hardware-wait function is used asynchronously To ensure the setup time until the start of the input assertion of WAIT, insert appropriate number of the software wait after the T1 state. Then, even if the AC specification above cannot be satisfied, the accesses can be executed correctly.
Rev. 6.00 Jul. 15, 2009 Page 807 of 816 REJ09B0237-0600
Item 25.4.12 EtherC Timing
Page Revision (See Manual for Details) 780 Added Note: These characteristics are valid in the case of utilizing the external PHY LSI. For example, "MDIO output" means that the MDIO input/output function is selected as the function of the pin PC16/MDIO, and the pin is used as the MDIO output pin of the on-chip EtherC.
Appendix Table A.1 Port States in Each Pin State
791
Added Notes: 7. In all pins having the weak keeper circuit, even with the "Z" (meaning high-impedance) description, each weak keeper circuit is always operating. For details on the weak keeper circuit, see section 19.6, Usage Notes.
B. Product Code Lineup
792
Added
Operating Product Code DS76190B125BG DS76190N125BG DS76190W125BG DS76190D125BG Catalogue Code R4S76190B125BG R4S76190N125BG R4S76190W125BG R4S76190D125BG Solder ball Temperature Composition -20 to 70C -20 to 85C -20 to 85C -40 to 85C -20 to 70C Non-Pb-free solder Non-Pb-free solder Non-Pb-free solder Non-Pb-free solder Pb-free solder Pb-free solder Pb-free solder Pb-free solder
DS76191B125BGV R4S76191B125BGV
DS76191N125BGV R4S76191N125BGV -20 to 85C DS76191W125BGV R4S76191W125BGV -20 to 85C DS76191D125BGV R4S76191D125BGV -40 to 85C
Rev. 6.00 Jul. 15, 2009 Page 808 of 816 REJ09B0237-0600
Index
Numerics
100Base-TX receive ............................... 651 100Base-TX transmit.............................. 648 100M phase lock loop (PLL) .................. 651 100M receive data across the MII........... 654 100M receive input................................. 651 100M transmit data across the MII ......... 648 100M transmit driver .............................. 650 10Base-T receive .................................... 656 10Base-T transmit................................... 654 10M receive data across the MII............. 656 10M receive input and squelch ............... 656 10M transmit data across the MII ........... 655 10M transmit drivers............................... 655 4B/5B encoding ...................................... 648 5B/4B decoding ...................................... 653
B
Bank active ............................................. 174 Basic timing ............................................ 149 Basic timing for I/O card interface.......... 195 Basic timing for memory card interface ............................ 193 Baud rate generator ................................. 477 Bit rate..................................................... 398 Boundary scan......................................... 629 Branch instructions ................................... 48 Burst mode.............................................. 354 Burst read................................................ 168 Burst write............................................... 172 Bus state controller (BSC) ...................... 107 Byte-selection SRAM interface .............. 186
C A
Access wait control................................. 154 Accessing MII registers .......................... 258 Address array............................................ 60 Address error exception handling ............. 73 Address error sources ............................... 73 Address multiplexing.............................. 159 Addressing modes..................................... 32 Alignment ............................................... 653 Arithmetic operation instructions ............. 45 Asynchronous mode ............................... 414 Auto-negotiation..................................... 658 Auto-negotiation disabling ..................... 660 Auto-refreshing....................................... 181 Auto-request mode ................................. 343 Cache ........................................................ 53 Cache structure.......................................... 53 Carrier sense ........................................... 661 Cases when exceptions are accepted......... 78 Changing clock operating mode.............. 211 Changing division ratio........................... 211 Changing frequency ................................ 210 Changing multiplication ratio ................. 210 Clock operating modes ........................... 204 Clock pulse generator (CPG) .................. 201 Coherency of cache and external memory ....................................... 59 Collision detect ....................................... 661 Compare match timer (CMT) ................. 367 Connection to PHY-LSI.......................... 263 Control registers........................................ 25 CPU........................................................... 23 Cycle-steal mode..................................... 352
Rev. 6.00 Jul. 15, 2009 Page 809 of 816 REJ09B0237-0600
D
Data array ................................................. 61 Data register............................................ 579 Data transfer instructions.......................... 43 Descrambling.......................................... 652 Direct memory access controller (DMAC) ................................................. 325 Divided areas and cache ........................... 55 Dual address mode.................................. 349
H
Half-duplex and full-duplex.................... 661 Host interface (HIF)................................ 511 H-UDI interrupt ...................................... 628 H-UDI reset ............................................ 628
I
I/O ports .................................................. 579 Illegal slot instructions.............................. 77 Immediate data formats............................. 29 Initial values of registers........................... 27 Input clock to PHY module .................... 668 Instruction formats .................................... 35 Instruction set............................................ 39 Intermittent mode.................................... 353 Interrupt controller (INTC) ....................... 83 Interrupt exception handling ..................... 75 Interrupt exception handling vector table.............................................. 100 Interrupt priority ....................................... 75 Interrupt response time ........................... 104 Interrupt sequence................................... 102 Interrupt sources ....................................... 74 IRQ interrupts ........................................... 98 Isolate mode............................................ 662
E
Endian/access size and data alignment ... 143 Equalizer, baseline wander correction and clock and data recovery ................... 652 EtherC receiver....................................... 255 EtherC transmitter .................................. 253 Ethernet controller (EtherC) ................... 233 Ethernet controller direct memory access controller (E-DMAC) .................. 267 Exception handling ................................... 67 Exception handling operations ................. 68 Exception handling vector table ............... 69 Extension of chip select (CSn) assertion period....................................... 156 External request mode ............................ 343
F
Features of instructions............................. 29 Fixed mode ............................................. 345 Flow control............................................ 262
J
Jabber detection ...................................... 657
L G
General illegal instructions ....................... 77 General registers (Rn)............................... 25 General signals ....................................... 667 LED description...................................... 664 Link integrity test.................................... 662 Logic operation instructions ..................... 47 Loopback operation ................................ 664
Rev. 6.00 Jul. 15, 2009 Page 810 of 816 REJ09B0237-0600
M
MAC interface ........................................ 657 Magic packet detection ........................... 261 Management signals ............................... 667 Manchester decoding .............................. 656 Manchester encoding .............................. 655 Memory data formats................................ 28 Memory-mapped cache ............................ 60 MII.......................................................... 657 MII frame timing .................................... 256 MII signals.............................................. 666 Miscellaneous functions ......................... 661 Module standby mode............................. 232 Multi-buffer frame transmit/receive processing .................... 304 multiplexed pin ....................................... 543
Pin assignments........................................... 8 Pin function controller (PFC).................. 543 Pin functions ............................................... 9 Power-down modes......................... 223, 662 Power-on reset .......................................... 71 Power-on sequence ................................. 184
R
Read access ............................................... 58 Receive data valid signal......................... 653 Receive descriptor 0 (RD0)..................... 297 Receive descriptor 1 (RD1)..................... 300 Receive descriptor 2 (RD2)..................... 300 Receiver errors ........................................ 654 Receiving serial data (asynchronous mode) .............................. 423 Receiving serial data (synchronous mode)................................ 432 Refreshing............................................... 181 Register data format.................................. 28 Registers APR............................. 251, 699, 719, 728 BAMRA...................... 596, 699, 720, 728 BAMRB ...................... 598, 699, 720, 728 BARA ......................... 595, 699, 720, 728 BARB.......................... 597, 699, 720, 728 BBRA.......................... 596, 699, 721, 728 BBRB.......................... 599, 699, 720, 728 BDMRB ...................... 599, 699, 719, 728 BDRB.......................... 598, 699, 719, 728 BETR .......................... 604, 699, 720, 728 BRCR.......................... 601, 699, 719, 728 BRDR.......................... 605, 699, 721, 728 BRSR .......................... 604, 699, 720, 728 CCR1 ............................ 56, 699, 721, 728 CDCR.......................... 248, 698, 717, 727 CEFCR........................ 249, 698, 718, 728 CHCR.................................................. 330 CHCR_0.............................. 692, 700, 722
Rev. 6.00 Jul. 15, 2009 Page 811 of 816 REJ09B0237-0600
N
NMI interrupt............................................ 97 Normal space interface ........................... 149 NRZI and MLT-3 decoding.................... 652 NRZI and MLT3 encoding ..................... 650
O
On-chip peripheral module interrupts....... 99 On-chip peripheral module request mode........................................... 344 Operation by IPG setting ........................ 262 Operation mode ...................................... 667
P
Parallel detection .................................... 660 PCMCIA interface .................................. 191 PHY (on-chip PHY module)................... 631 PHY address ........................................... 667 PHY interface (PHY-IF)......................... 683 PHY management control....................... 635
CHCR_1 ............................. 692, 701, 722 CHCR_2 ............................. 692, 701, 722 CHCR_3 ............................. 692, 702, 722 CMCNT.............................................. 370 CMCNT_0.......................... 696, 709, 725 CMCNT_1.......................... 696, 709, 725 CMCOR.............................................. 370 CMCOR_0.......................... 696, 709, 725 CMCOR_1.......................... 696, 709, 725 CMCSR .............................................. 369 CMCSR_0 .......................... 696, 709, 725 CMCSR_1 .......................... 696, 709, 725 CMNCR.......................116, 697, 711, 726 CMSTR .......................368, 696, 709, 725 CNDCR .......................248, 698, 718, 728 CS0BCR ............................. 697, 711, 726 CS0WCR .....................122, 697, 712, 726 CS3BCR ............................. 697, 711, 726 CS3WCR .............124, 132, 697, 712, 726 CS4BCR ............................. 697, 711, 726 CS4WCR .....................125, 697, 712, 726 CS5BBCR........................... 697, 711, 726 CS5BWCR ..........128, 134, 697, 712, 726 CS6BBCR........................... 697, 711, 726 CS6BWCR ..........130, 134, 697, 712, 726 CSnBCR ............................................. 117 CSnWCR ............................................ 122 DAR.................................................... 329 DAR_0................................ 692, 700, 722 DAR_1................................ 692, 700, 722 DAR_2................................ 692, 701, 722 DAR_3................................ 692, 702, 722 DMAOR ......................336, 692, 702, 722 DMARS.............................................. 339 DMARS0............................ 693, 704, 723 DMARS1............................ 693, 704, 723 DMATCR ........................................... 329 DMATCR_0 ....................... 692, 700, 722 DMATCR_1 ....................... 692, 701, 722 DMATCR_2 ....................... 692, 701, 722
Rev. 6.00 Jul. 15, 2009 Page 812 of 816 REJ09B0237-0600
DMATCR_3 ....................... 692, 702, 722 ECMR ......................... 238, 698, 716, 727 ECSIPR....................... 243, 698, 716, 727 ECSR .......................... 241, 698, 716, 727 EDMR......................... 269, 697, 713, 727 EDOCR....................... 287, 698, 715, 727 EDRRR ....................... 271, 697, 714, 727 EDTRR ....................... 270, 697, 713, 727 EESIPR ....................... 278, 697, 714, 727 EESR........................... 273, 697, 714, 727 FCFTR ........................ 289, 698, 715, 727 FDR............................. 285, 697, 715, 727 FRECR........................ 249, 698, 718, 728 FRQCR ....................... 206, 694, 705, 724 HIFADR ..................... 524, 696, 710, 726 HIFBCR...................... 525, 696, 711, 726 HIFBICR..................... 527, 696, 710, 726 HIFDATA................... 525, 696, 710, 726 HIFDTR...................... 526, 696, 710, 726 HIFEICR..................... 523, 696, 710, 726 HIFGSR ...................... 518, 696, 709, 726 HIFIDX....................... 515, 696, 709, 726 HIFIICR...................... 523, 696, 710, 726 HIFMCR ..................... 521, 696, 710, 726 HIFSCR ...................... 518, 696, 709, 726 ICR0.............................. 86, 694, 705, 723 IPGR ........................... 251, 698, 719, 728 IPR ........................................................ 95 IPRA ................................... 694, 705, 723 IPRB ................................... 694, 705, 723 IPRC ................................... 693, 704, 723 IPRD ................................... 693, 704, 723 IPRE.................................... 693, 704, 723 IPRF.................................... 693, 704, 723 IPRG ................................... 693, 704, 723 IRQCR .......................... 87, 694, 705, 723 IRQSR........................... 90, 694, 705, 723 LCCR.......................... 248, 698, 717, 728 MAFCR ...................... 250, 698, 718, 728 MAHR ........................ 245, 698, 717, 727
MALR......................... 245, 698, 717, 727 MCLKCR ................... 208, 694, 704, 723 MPR............................ 252, 699, 719, 728 PACRH1..................... 554, 692, 702, 722 PACRH2..................... 554, 692, 702, 722 PADRH....................... 579, 692, 702, 722 PAIORH ..................... 554, 692, 702, 722 PBCRL1 ..................... 557, 693, 702, 722 PBCRL2 ..................... 557, 693, 702, 722 PBDRL ....................... 581, 692, 702, 722 PBIORL...................... 557, 692, 702, 722 PCCRH2 ..................... 561, 693, 703, 723 PCCRL1 ..................... 561, 693, 703, 723 PCCRL2 ..................... 561, 693, 703, 723 PCDRH....................... 584, 693, 703, 722 PCDRL ....................... 584, 693, 703, 722 PCIORH ..................... 561, 693, 703, 722 PCIORL...................... 561, 693, 703, 722 PDCRL2 ..................... 567, 693, 703, 723 PDDRL ....................... 586, 693, 703, 723 PDIORL...................... 566, 693, 703, 723 PECRH1 ..................... 569, 693, 703, 723 PECRH2 ..................... 569, 693, 704, 723 PECRL1...................... 569, 693, 704, 723 PECRL2...................... 569, 693, 704, 723 PEDRH ....................... 589, 693, 703, 723 PEDRL ....................... 589, 693, 703, 723 PEIORH...................... 569, 693, 703, 723 PEIORL ...................... 569, 693, 703, 723 PHYIFADDRR........... 687, 696, 708, 725 PHYIFCR ................... 685, 696, 708, 725 PHYIFSMIR2............. 686, 696, 708, 725 PHYIFSMIR3............. 687, 696, 708, 725 PHYIFSR.................... 688, 696, 709, 725 PIR.............................. 244, 698, 716, 727 PSR ............................. 247, 698, 717, 727 RBWAR ..................... 288, 698, 715, 727 RDFAR....................... 288, 698, 716, 727 RDLAR....................... 272, 697, 714, 727 Register 0 (basic control).................... 643
Register 1 (basic status) ...................... 644 Register 2 (PHY identifier 1) .............. 644 Register 3 (PHY identifier 2) .............. 645 Register 4 (auto negotiation advertisement)......... 645 Register 5 (auto negotiation link partner ability) ............................. 646 Register 6 (auto negotiation expansion)............... 647 RFCR .......................... 250, 698, 718, 728 RFLR .......................... 246, 698, 717, 727 RMCR......................... 286, 697, 715, 727 RMFCR....................... 283, 697, 714, 727 RTCNT ....................... 141, 697, 713, 727 RTCOR ....................... 142, 697, 713, 727 RTCSR........................ 139, 697, 713, 726 SAR..................................................... 329 SAR_0................................. 692, 700, 722 SAR_1................................. 692, 700, 722 SAR_2................................. 692, 701, 722 SAR_3................................. 692, 701, 722 SCBRR................................................ 398 SCBRR_0............................ 694, 705, 724 SCBRR_1............................ 695, 706, 724 SCBRR_2............................ 695, 706, 724 SCFCR ................................................ 405 SCFCR_0 ............................ 694, 705, 724 SCFCR_1 ............................ 695, 706, 724 SCFCR_2 ............................ 695, 707, 725 SCFDR................................................ 408 SCFDR_0............................ 694, 706, 724 SCFDR_1............................ 695, 706, 724 SCFDR_2............................ 695, 707, 725 SCFRDR ............................................. 382 SCFRDR_0 ......................... 694, 705, 724 SCFRDR_1 ......................... 695, 706, 724 SCFRDR_2 ......................... 695, 707, 725 SCFSR ................................................ 390 SCFSR_0 ............................ 694, 705, 724 SCFSR_1 ............................ 695, 706, 724
Rev. 6.00 Jul. 15, 2009 Page 813 of 816 REJ09B0237-0600
SCFSR_2 ............................ 695, 706, 724 SCFTDR............................................. 383 SCFTDR_0 ......................... 694, 705, 724 SCFTDR_1 ......................... 695, 706, 724 SCFTDR_2 ......................... 695, 706, 724 SCLSR................................................ 413 SCLSR_0............................ 694, 706, 724 SCLSR_1............................ 695, 706, 724 SCLSR_2............................ 695, 707, 725 SCRSR................................................ 382 SCSCR................................................ 386 SCSCR_0............................ 694, 705, 724 SCSCR_1............................ 695, 706, 724 SCSCR_2............................ 695, 706, 724 SCSMR............................................... 383 SCSMR_0........................... 694, 705, 724 SCSMR_1........................... 695, 706, 724 SCSMR_2........................... 695, 706, 724 SCSPTR.............................................. 409 SCSPTR_0.......................... 694, 706, 724 SCSPTR_1.......................... 695, 706, 724 SCSPTR_2.......................... 695, 707, 725 SCTSR................................................ 382 SDBPR ............................................... 617 SDBSR ............................................... 618 SDCR...........................138, 697, 713, 726 SDID............................625, 694, 704, 723 SDIR............................617, 694, 704, 723 SICDAR ......................473, 695, 707, 725 SICTR................................................. 695 SICTR................................. 452, 707, 725 SIFCTR .............................................. 695 SIFCTR .............................. 467, 707, 725 SIIER ...........................465, 695, 707, 725 SIMDR ........................449, 695, 707, 725 SIRCR .........................458, 696, 708, 725 SIRDAR ......................472, 695, 707, 725 SIRDR .........................456, 695, 708, 725 SISCR..........................469, 695, 707, 725 SISTR ..........................459, 695, 707, 725
Rev. 6.00 Jul. 15, 2009 Page 814 of 816 REJ09B0237-0600
SITCR ......................... 457, 696, 708, 725 SITDAR...................... 470, 695, 707, 725 SITDR......................... 455, 695, 708, 725 SPICR ......................... 474, 696, 708, 725 STBCR........................ 225, 694, 705, 724 STBCR2...................... 226, 694, 705, 724 STBCR3...................... 227, 693, 704, 723 STBCR4...................... 228, 694, 704, 723 TBRAR ....................... 288, 698, 716, 727 TDFAR ....................... 289, 698, 716, 727 TDLAR ....................... 272, 697, 714, 727 TFTR........................... 284, 697, 715, 727 TLFRCR ..................... 250, 698, 718, 728 TPAUSER................... 252, 699, 719, 728 TRIMD ....................... 290, 698, 715, 727 TROCR ....................... 247, 698, 717, 727 TRSCER ..................... 281, 697, 714, 727 TSFRCR ..................... 249, 698, 718, 728 WTCNT ...................... 217, 694, 705, 724 WTCSR....................... 217, 694, 705, 724 Relationship between refresh requests and bus cycles ............... 184 Reset ................................................. 71, 663 Re-starting auto-negotiation.................... 660 RISC-type ................................................. 29 Round-robin mode .................................. 346
S
SCIF initialization (asynchronous mode) .............................. 418 SCIF initialization (synchronous mode)................................ 428 Scrambling.............................................. 650 SDRAM direct connection...................... 157 SDRAM interface ................................... 157 Searching cache ........................................ 57 Self-refreshing ........................................ 183 Serial communication interface with FIFO (SCIF)............................................ 377
Serial I/O with FIFO (SIOF)................... 445 Serial management interface (SMI)........ 635 Shift instructions....................................... 48 Signals relevant to PHY-IF..................... 667 Single address mode ............................... 351 Single read .............................................. 172 Single write............................................. 174 Sleep mode ............................................. 229 SMI register ............................................ 642 Software standby mode........................... 230 SPI mode ................................................ 502 Stack states after exception handling ends............................................ 79 State transition .......................................... 51 Synchronous mode ................................. 427 System control instructions....................... 49 System registers........................................ 26
Transmitting and receiving serial data simultaneously (synchronous mode)....... 434 Transmitting serial data (asynchronous mode) .............................. 420 Transmitting serial data (synchronous mode)................................ 430 Trap instructions ....................................... 76 Treatment of pins when PHY power supply is not used................ 668 Types of exception handling and priority ...................................................... 67 Types of exceptions triggered by instructions................................................ 76 Types of power-down modes.................. 223
U
U memory ................................................. 65 User break controller (UBC)................... 593 User break interrupt .................................. 99 User debugging interface (H-UDI) ......... 615
T
TAP controller ........................................ 626 The procedures of set up the external PHY LSI ................... 690 The procedures of setting up the on-chip PHY..................... 689 Transmit descriptor 0 (TD0) ................... 293 Transmit descriptor 1 (TD1) ................... 295 Transmit descriptor 2 (TD2) ................... 295
W
Wait between access cycles .................... 198 Watchdog timer (WDT) .......................... 215 Write access .............................................. 59 Write-back buffer...................................... 59
Rev. 6.00 Jul. 15, 2009 Page 815 of 816 REJ09B0237-0600
Rev. 6.00 Jul. 15, 2009 Page 816 of 816 REJ09B0237-0600
Renesas 32-Bit RISC Microcomputer Hardware Manual SH7619 Group
Publication Date: Rev.1.00, Mar. 18, 2005 Rev.6.00, Jul. 15, 2009 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Customer Support Department Global Strategic Communication Div. Renesas Solutions Corp.
2009. Renesas Technology Corp., All rights reserved. Printed in Japan.
Sales Strategic Planning Div.
Nippon Bldg., 2-6-2, Ohte-machi, Chiyoda-ku, Tokyo 100-0004, Japan
RENESAS SALES OFFICES
Refer to "http://www.renesas.com/en/network" for the latest and detailed information. Renesas Technology America, Inc. 450 Holger Way, San Jose, CA 95134-1368, U.S.A Tel: <1> (408) 382-7500, Fax: <1> (408) 382-7501 Renesas Technology Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K. Tel: <44> (1628) 585-100, Fax: <44> (1628) 585-900 Renesas Technology (Shanghai) Co., Ltd. Unit 204, 205, AZIACenter, No.1233 Lujiazui Ring Rd, Pudong District, Shanghai, China 200120 Tel: <86> (21) 5877-1818, Fax: <86> (21) 6887-7858/7898 Renesas Technology Hong Kong Ltd. 7th Floor, North Tower, World Finance Centre, Harbour City, Canton Road, Tsimshatsui, Kowloon, Hong Kong Tel: <852> 2265-6688, Fax: <852> 2377-3473 Renesas Technology Taiwan Co., Ltd. 10th Floor, No.99, Fushing North Road, Taipei, Taiwan Tel: <886> (2) 2715-2888, Fax: <886> (2) 3518-3399 Renesas Technology Singapore Pte. Ltd. 1 Harbour Front Avenue, #06-10, Keppel Bay Tower, Singapore 098632 Tel: <65> 6213-0200, Fax: <65> 6278-8001 Renesas Technology Korea Co., Ltd. Kukje Center Bldg. 18th Fl., 191, 2-ka, Hangang-ro, Yongsan-ku, Seoul 140-702, Korea Tel: <82> (2) 796-3115, Fax: <82> (2) 796-2145
http://www.renesas.com
Renesas Technology Malaysia Sdn. Bhd Unit 906, Block B, Menara Amcorp, Amcorp Trade Centre, No.18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia Tel: <603> 7955-9390, Fax: <603> 7955-9510
Colophon 6.2
SH7619 Group Hardware Manual
1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan
REJ09B0237-0600


▲Up To Search▲   

 
Price & Availability of R4S76190

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X